<commit_before>function factory() {
    class Bluebird extends Promise {}
    Bluebird.TypeError = TypeError; // Bluebird.TypeError is used in tests

    require('./promiseFns/tap')(Bluebird);
    require('./promiseFns/props')(Bluebird);
    require('./promiseFns/spread')(Bluebird);
    require('./promiseFns/promisify')(Bluebird);
    require('./promiseFns/join')(Bluebird);
    require('./promiseFns/try')(Bluebird);
    require('./promiseFns/method')(Bluebird);
    require('./promiseFns/each')(Bluebird);
    require('./promiseFns/mapSeries')(Bluebird);
    require('./promiseFns/map')(Bluebird);
    require('./promiseFns/get')(Bluebird);
    require('./promiseFns/call')(Bluebird);
    require('./promiseFns/reflect')(Bluebird);
    require('./promiseFns/finally')(Bluebird);
    require('./promiseFns/return')(Bluebird);
    require('./promiseFns/reduce')(Bluebird);
    require('./promiseFns/throw')(Bluebird);
    require('./promiseFns/catchReturn')(Bluebird);
    require('./promiseFns/catchThrow')(Bluebird);
    require('./promiseFns/reflect')(Bluebird);
    require('./promiseFns/catch')(Bluebird);
    require('./promiseFns/coroutine')(Bluebird);
    require('./promiseFns/cast')(Bluebird);
    require('./promiseFns/fromCallback')(Bluebird);
    require('./promiseFns/setScheduler')(Bluebird);
    require('./promiseFns/asCallback')(Bluebird);
    require('./promiseFns/noConflict')(Bluebird);
    require('./promiseFns/defer')(Bluebird);
    return Bluebird;
}
const copy = factory();
copy.getNewLibraryCopy = () => {
    const newCopy = factory();
    newCopy.getNewLibraryCopy = copy.getNewLibraryCopy;
    return newCopy;
};

module.exports = copy;
<commit_msg>add done API, closes #50<commit_after>function factory() {
    class Bluebird extends Promise {}
    Bluebird.TypeError = TypeError; // Bluebird.TypeError is used in tests

    require('./promiseFns/tap')(Bluebird);
    require('./promiseFns/props')(Bluebird);
    require('./promiseFns/spread')(Bluebird);
    require('./promiseFns/promisify')(Bluebird);
    require('./promiseFns/join')(Bluebird);
    require('./promiseFns/try')(Bluebird);
    require('./promiseFns/method')(Bluebird);
    require('./promiseFns/each')(Bluebird);
    require('./promiseFns/mapSeries')(Bluebird);
    require('./promiseFns/map')(Bluebird);
    require('./promiseFns/get')(Bluebird);
    require('./promiseFns/call')(Bluebird);
    require('./promiseFns/reflect')(Bluebird);
    require('./promiseFns/finally')(Bluebird);
    require('./promiseFns/return')(Bluebird);
    require('./promiseFns/reduce')(Bluebird);
    require('./promiseFns/throw')(Bluebird);
    require('./promiseFns/catchReturn')(Bluebird);
    require('./promiseFns/catchThrow')(Bluebird);
    require('./promiseFns/reflect')(Bluebird);
    require('./promiseFns/catch')(Bluebird);
    require('./promiseFns/coroutine')(Bluebird);
    require('./promiseFns/cast')(Bluebird);
    require('./promiseFns/fromCallback')(Bluebird);
    require('./promiseFns/setScheduler')(Bluebird);
    require('./promiseFns/asCallback')(Bluebird);
    require('./promiseFns/noConflict')(Bluebird);
    require('./promiseFns/defer')(Bluebird);
    require('./promiseFns/done')(Bluebird);
    return Bluebird;
}
const copy = factory();
copy.getNewLibraryCopy = () => {
    const newCopy = factory();
    newCopy.getNewLibraryCopy = copy.getNewLibraryCopy;
    return newCopy;
};

module.exports = copy;

{'fraction_non_alphanumeric': 0.19139596136962247, 'fraction_numerical': 0.000585308750365818, 'mean_word_length': 4.575856443719413, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4761576', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1103, 'n_words': 117}