<commit_before>Array.prototype.insert = function (index, item) {
    this.splice(index, 1, item);
};

Array.prototype.clear = function () {
    this.length = 0;
};

Array.prototype.removeAt = function (index) {
    this.splice(index, 1);
};

Array.prototype.empty = function (query) {
    if (typeof (query) === "function") {
        return this.where(query).length === 0;
    }
    return this.length === 0;
};

Array.prototype.any = function (query) {
    if (typeof(query) === "function") {
        return this.where(query).length > 0;
    }
    return this.length > 0;
};

Array.prototype.removeFirst = function (item) {
    for (var i = 0; i < this.length; i++) {
        if (this[i] == item) {
            this.splice(i, 1);
            return item;
        }
    }
};

Array.prototype.removeAll = function (item) {
    for (var i = 0; i < this.length; i++) {
        if (this[i] == item) {
            this.splice(i, 1);
        }
    }
};

Array.prototype.equals = function (array) {
    var a1 = JSON.stringify(this);
    var a2 = JSON.stringify(array);

    return a1 === a2;
}

Array.prototype.seekAndDestroy = function (w) {
    var founds = [];
    for (var i = 0; i < this.length; i++) {
        if (w(this[i])) {
            this.removeFirst(this[i]);
            i--;
        }
    }
};
<commit_msg>ajustes no SeekAndDestroy<commit_after>Array.prototype.insert = function (index, item) {
    this.splice(index, 1, item);
};

Array.prototype.clear = function () {
    this.length = 0;
};

Array.prototype.removeAt = function (index) {
    this.splice(index, 1);
};

Array.prototype.empty = function (query) {
    if (typeof (query) === "function") {
        return this.where(query).length === 0;
    }
    return this.length === 0;
};

Array.prototype.any = function (query) {
    if (typeof(query) === "function") {
        return this.where(query).length > 0;
    }
    return this.length > 0;
};

Array.prototype.removeFirst = function (item) {
    for (var i = 0; i < this.length; i++) {
        if (this[i] == item) {
            this.splice(i, 1);
            return item;
        }
    }
};

Array.prototype.removeAll = function (item) {
    for (var i = 0; i < this.length; i++) {
        if (this[i] == item) {
            this.splice(i, 1);
        }
    }
};

Array.prototype.equals = function (array) {
    var a1 = JSON.stringify(this);
    var a2 = JSON.stringify(array);

    return a1 === a2;
}

Array.prototype.seekAndDestroy = function (w) {
    var founds = [];
    for (var i = 0; i < this.length; i++) {
        if (typeof(w) === "function" && w(this[i])) {
            this.removeAt(i);
            i--;
        }else if(this[i]===w){
            this.removeAt(i);
            i--;
        }
    }
};

{'fraction_non_alphanumeric': 0.17488134355604235, 'fraction_numerical': 0.011683096020445418, 'mean_word_length': 2.1566820276497696, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '710998', 'n_tokens_mistral': 955, 'n_tokens_neox': 928, 'n_words': 210}