<commit_before>'use strict';

var promiseLib;

exports.set = function(lib) {

    if (promiseLib) {
        promiseLib = parsePromiseLib(lib);
    } else {
        // if not ES6, native Promise is not support
        if (typeof(Promise) === 'undefined') {
            throw new TypeError('Promise library must be specified.');
        }
        promiseLib = parsePromiseLib(Promise);
    }

    return promiseLib;
};

exports.promisify = function(func) {
    if (!promiseLib) { promiseLib = parsePromiseLib(Promise); }

    return function () {
        var args = Array.prototype.slice.call(arguments);
        return new Promise(function (resolve, reject) {
            args.push(function (err, res) {<commit_msg>fix promise bug 2<commit_after>'use strict';

var promiseLib;

exports.set = function(lib) {

    if (lib) {
        promiseLib = parsePromiseLib(lib);
    } else {
        // if not ES6, native Promise is not support
        if (typeof(Promise) === 'undefined') {
            throw new TypeError('Promise library must be specified.');
        }
        promiseLib = parsePromiseLib(Promise);
    }

    return promiseLib;
};

exports.promisify = function(func) {
    if (!promiseLib) { promiseLib = parsePromiseLib(Promise); }

    return function () {
        var args = Array.prototype.slice.call(arguments);
        return new Promise(function (resolve, reject) {
            args.push(function (err, res) {
{'fraction_non_alphanumeric': 0.11789473684210526, 'fraction_numerical': 0.002105263157894737, 'mean_word_length': 2.6564102564102563, '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': '3572031', 'n_tokens_mistral': 401, 'n_tokens_neox': 399, 'n_words': 107}