<commit_before>'use strict';

/******************
 *  Dependencies  *
 ******************/

var fs = require('fs');
var path = require('path');
var Promise = require('Promise');

/*************
 *  Exports  *
 *************/

module.exports = function(context) {
    var dest = path.join(process.cwd(), '_context.json');

    return new Promise(function(resolve, reject) {
        fs.writeFile(dest, JSON.stringify(context, null, 4), function(err) {
            if (err) {
                reject('[write-context.js] ' + err);
            }
            else { resolve(context); }
        });
    });
};<commit_msg>fix require('Promise')<commit_after>'use strict';

/******************
 *  Dependencies  *
 ******************/

var fs = require('fs');
var path = require('path');
var Promise = require('promise');

/*************
 *  Exports  *
 *************/

module.exports = function(context) {
    var dest = path.join(process.cwd(), '_context.json');

    return new Promise(function(resolve, reject) {
        fs.writeFile(dest, JSON.stringify(context, null, 4), function(err) {
            if (err) {
                reject('[write-context.js] ' + err);
            }
            else { resolve(context); }
        });
    });
};
{'fraction_non_alphanumeric': 0.25425101214574897, 'fraction_numerical': 0.0016194331983805667, 'mean_word_length': 2.768292682926829, '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': '6688676', 'n_tokens_mistral': 368, 'n_tokens_neox': 361, 'n_words': 69}