<commit_before>//函数
Function.prototype.bind = Function.prototype.bind || function(context){
    var self = this;
    return function() {
        return self.apply(context, arguments);
    }
};

//数值
if(!Number.toFixed){
    Number.prototype.toFixed = function(len){
        var times = Math.pow(10,len);
        return Math.round(this*times)/times;
    }
}

//字符串
if(!String.prototype.trim) {
	String.prototype.trim = function () {
    	return this.replace(/^\s+|\s+$/g,'');
	};
}

//日期
if (!Date.now) {
	Date.now = function now() {
    	return new Date().getTime();
	};
}

//对象
if (typeof Object.create !== 'function') {  
    Object.create = function(o) {  
        function F() {}  
        F.prototype = o;  
		return new F();  
    };  
}
if (!Object.keys) Object.keys = function(o) {
	if (o !== Object(o))
    	throw new TypeError('Object.keys called on a non-object');
  	var k=[],p;
  	for (p in o) if (Object.prototype.hasOwnProperty.call(o,p)) k.push(p);<commit_msg>updated es5 toISOString方法兼容<commit_after>//函数
Function.prototype.bind = Function.prototype.bind || function(context){
    var self = this;
    return function() {
        return self.apply(context, arguments);
    }
};

//数值
if(!Number.toFixed){
    Number.prototype.toFixed = function(len){
        var times = Math.pow(10,len);
        return Math.round(this*times)/times;
    }
}

//字符串
if(!String.prototype.trim) {
	String.prototype.trim = function () {
    	return this.replace(/^\s+|\s+$/g,'');
	};
}

//日期
if (!Date.now){
	Date.now = function now(){
    	return new Date().getTime();
	};
}
if (!Date.prototype.toISOString){
    (function(){
        function pad(number) {
            var r = String(number);
            if (r.length === 1) {
                r = '0' + r;
            }
            return r;
        }
        Date.prototype.toISOString = function(){
            return this.getUTCFullYear()
                + '-' + pad(this.getUTCMonth() + 1)
                + '-' + pad(this.getUTCDate())
                + 'T' + pad(this.getUTCHours())
                + ':' + pad(this.getUTCMinutes())
                + ':' + pad(this.getUTCSeconds())
                + '.' + String((this.getUTCMilliseconds()/1000).toFixed(3)).slice(2,5)
                + 'Z';
        };
    }());
}

//对象
if (typeof Object.create !== 'function') {  
    Object.create = function(o) {  
        function F() {}  
        F.prototype = o;  
		return new F();  
    };  
}
if (!Object.keys) Object.keys = function(o) {
	if (o !== Object(o))
    	throw new TypeError('Object.keys called on a non-object');
  	var k=[],p;
  	for (p in o) if (Object.prototype.hasOwnProperty.call(o,p)) k.push(p);
{'fraction_non_alphanumeric': 0.18151071025930102, 'fraction_numerical': 0.005636978579481398, 'mean_word_length': 2.218863361547763, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4696355', 'n_tokens_mistral': 923, 'n_tokens_neox': 916, 'n_words': 176}