<commit_before>'use strict';

var Promise = module.exports = function (executor) {
    this._callbacks = [];
    executor(this._resolve.bind(this), this._reject.bind(this));
};
Promise.resolve = function (value) {
    return new Promise(function (resolve) { resolve(value); });
};
Promise.reject = function (error) {
    return new Promise(function (resolve, reject) { reject(error); });
};
Promise.cast = function (value) {
    if (value instanceof Promise) return value;
    return Promise.resolve(value);
};

Promise.prototype = {

    // Private properties and methods:
    _failed: false,
    _resolved: false,
    _settled: false,
    _release: function (onSuccess, onFail) {
        if (this._failed) {
            if (typeof onFail === 'function') onFail(this._value);
            else throw this._value;
        } else {
            if (typeof onSuccess === 'function') onSuccess(this._value);<commit_msg>Assure constructor on Promise.prototype<commit_after>'use strict';

var Promise = module.exports = function (executor) {
    this._callbacks = [];
    executor(this._resolve.bind(this), this._reject.bind(this));
};
Promise.resolve = function (value) {
    return new Promise(function (resolve) { resolve(value); });
};
Promise.reject = function (error) {
    return new Promise(function (resolve, reject) { reject(error); });
};
Promise.cast = function (value) {
    if (value instanceof Promise) return value;
    return Promise.resolve(value);
};

Promise.prototype = {
    constructor: Promise,

    // Private properties and methods:
    _failed: false,
    _resolved: false,
    _settled: false,
    _release: function (onSuccess, onFail) {
        if (this._failed) {
            if (typeof onFail === 'function') onFail(this._value);
            else throw this._value;
        } else {
            if (typeof onSuccess === 'function') onSuccess(this._value);
{'fraction_non_alphanumeric': 0.13670212765957446, 'fraction_numerical': 0.0, 'mean_word_length': 3.3241379310344827, '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': '2662624', 'n_tokens_mistral': 529, 'n_tokens_neox': 524, 'n_words': 142}