<commit_before>"use strict";
var {
    Array,
    Function,
    String,
    Object
} = this;
var undefined;

function map(f, o) {
    var res = Array(this.length);
    if (!(f instanceof Function)) return res;
    if (this instanceof String) {
        res = this.split("").map(f, o);
    } else {
        for (var cx = 0, dx = this.length; cx < dx; cx++) {
            if (this[cx] !== undefined)
                res[cx] = f.call(o, this[cx], cx, this);
        }
    }
    return res;
}
function forEach(f, o) {
    if (!(f instanceof Function)) return;
    if (this instanceof String) {
        this.split("").forEach(f, o);
    }
    for (var cx = 0, dx = this.length; cx < dx; cx++) {
        if (this[cx] !== undefined)
            f.call(o, this[cx], cx, this);
    }
}
function filter(f, o) {
    if (!(f instanceof Function)) return;
    var result = [];
    if (this instanceof String) {
        result = this.split("").filter(f, o);
    }
    for (var cx = 0, dx = this.length; cx < dx; cx++) {
        if (this[cx] !== undefined)
            if (f.call(o, this[cx], cx, this))
                result.push(this[cx]);
    }
    return result;
}
function indexOf(searchElement, fromIndex = 0) {
    for (var cx = fromIndex, dx = this.length; cx < dx; cx++) {
        if (this[cx] === searchElement) return cx;
    }
    return -1;
}
function trim() {
    return String(this).replace(/^[\s\u00a0]+|[\s\u00a0]$/g, "");
}
var hasOwnProperty = {}.hasOwnProperty;
var keys = function keys(object) {
    var result = [];
    for (var k in object) {
        if (!hasOwnProperty.call(object, k)) break;
        // 如果遇到非私有属性，说明私有属性已经遍历完
        result.push(k);
    }
    return result;
};
Array.prototype.map = map;
Array.prototype.forEach = forEach;
Array.prototype.indexOf = indexOf;
Array.prototype.filter = filter;
String.prototype.trim = trim;
Object.keys = keys;
Function.prototype.bind = function (context) {
    var args = [].concat.apply([], arguments).slice(1);
    return () => {
        return this.apply(context, args.concat.apply(args, arguments));
    };
};<commit_msg>Object.create扩展<commit_after>"use strict";
var {
    Array,
    Function,
    String,
    Object
} = this;
var undefined;

function map(f, o) {
    var res = Array(this.length);
    if (!(f instanceof Function)) return res;
    if (this instanceof String) {
        res = this.split("").map(f, o);
    } else {
        for (var cx = 0, dx = this.length; cx < dx; cx++) {
            if (this[cx] !== undefined)
                res[cx] = f.call(o, this[cx], cx, this);
        }
    }
    return res;
}
function forEach(f, o) {
    if (!(f instanceof Function)) return;
    if (this instanceof String) {
        this.split("").forEach(f, o);
    }
    for (var cx = 0, dx = this.length; cx < dx; cx++) {
        if (this[cx] !== undefined)
            f.call(o, this[cx], cx, this);
    }
}
function filter(f, o) {
    if (!(f instanceof Function)) return;
    var result = [];
    if (this instanceof String) {
        result = this.split("").filter(f, o);
    }
    for (var cx = 0, dx = this.length; cx < dx; cx++) {
        if (this[cx] !== undefined)
            if (f.call(o, this[cx], cx, this))
                result.push(this[cx]);
    }
    return result;
}
function indexOf(searchElement, fromIndex = 0) {
    for (var cx = fromIndex, dx = this.length; cx < dx; cx++) {
        if (this[cx] === searchElement) return cx;
    }
    return -1;
}
function trim() {
    return String(this).replace(/^[\s\u00a0]+|[\s\u00a0]$/g, "");
}
var hasOwnProperty = {}.hasOwnProperty;
var keys = function keys(object) {
    var result = [];
    for (var k in object) {
        if (!hasOwnProperty.call(object, k)) break;
        // 如果遇到非私有属性，说明私有属性已经遍历完
        result.push(k);
    }
    return result;
};
Array.prototype.map = map;
Array.prototype.forEach = forEach;
Array.prototype.indexOf = indexOf;
Array.prototype.filter = filter;
String.prototype.trim = trim;
Object.keys = keys;
Object.create = function (object) {
    function ExtendedClass() {
    };
    ExtendedClass.prototype = object;
    return new ExtendedClass;
};
Function.prototype.bind = function (context) {
    var args = [].concat.apply([], arguments).slice(1);
    return () => {
        return this.apply(context, args.concat.apply(args, arguments));
    };
};
{'fraction_non_alphanumeric': 0.1680964525852075, 'fraction_numerical': 0.005564572223510317, 'mean_word_length': 2.462279293739968, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, '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': '2091173', 'n_tokens_mistral': 1456, 'n_tokens_neox': 1454, 'n_words': 382}