<commit_before>/**
 * IE8 Property Patch
 *
 * This stupid hack attempts to circumvent IE8's inability to define properties
 * on native JS objects by merging their properties/methods into a detached DOM
 * element and returning it.
 *
 * @param {Function|Object} obj - Native JavaScript object before it's targeted
 *                                by Object.defineProperty.
 * @return {HTMLElement}
 */
var IE8PP = function(obj){

	if(obj instanceof Element)
		return obj;

	if("function" === typeof obj)
		return function(){
			var shadow = document.createElement("s");
			for(var p in obj.prototype)
				shadow[p] = obj.prototype[p];
			shadow.prototype = obj.prototype;
			obj.apply(shadow, arguments);
			return shadow;
		}

	else{
		var shadow = document.createElement("s");
		for(var p in obj)
			shadow[p] = obj[p];
		shadow.prototype = obj;
		return shadow;
	}
};<commit_msg>Restrict IE8PP to loading only in IE8<commit_after>/**
 * IE8 Property Patch
 *
 * This stupid hack attempts to circumvent IE8's inability to define properties
 * on native JS objects by merging their properties/methods into a detached DOM
 * element and returning it.
 *
 * @param {Function|Object} obj - Native JavaScript object before it's targeted
 *                                by Object.defineProperty.
 * @return {HTMLElement}
 */
if(function(){
	try{Object.defineProperty({}, "s", {value: true})}
	catch(e){return true}
}()){

	window.IE8PP = function(obj){

		if(obj instanceof Element)
			return obj;

		if("function" === typeof obj)
			return function(){
				var shadow = document.createElement("s");
				for(var p in obj.prototype)
					shadow[p] = obj.prototype[p];
				shadow.prototype = obj.prototype;
				obj.apply(shadow, arguments);
				return shadow;
			}

		else{
			var shadow = document.createElement("s");
			for(var p in obj)
				shadow[p] = obj[p];
			shadow.prototype = obj;
			return shadow;
		}
	};
}
{'fraction_non_alphanumeric': 0.11847599164926931, 'fraction_numerical': 0.0041753653444676405, 'mean_word_length': 3.2411504424778763, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4301067', 'n_tokens_mistral': 637, 'n_tokens_neox': 553, 'n_words': 184}