<commit_before>var fs = require('fs');
var constants = require('../constants.js');

/**
 * Unpack a remote google script file into seperate .js files
 *
 * @param {getEventsCallback} callback
 */
module.exports = function(force, callback) {
    var local = constants.META_DIR + constants.META_LOCAL;
    var remote = constants.META_DIR + constants.META_REMOTE;
    //Calculate changes and ask for confimation, add -f flag to not do that

    fs.readFile(remote, 'utf8', function(err, data) {
        if (err) {
            callback(err);
            return;
        }
        var result = JSON.parse(data);
        for (file of result['files']) {
            fs.writeFile(file.name + '.js', file.source, function() {});
        }
        fs.writeFile(local, data, function() {});
        callback();
        return;
    });
}
<commit_msg>removed "force" argument<commit_after>var fs = require('fs');
var constants = require('../constants.js');

/**
 * Unpack a remote google script file into seperate .js files
 *
 * @param {getEventsCallback} callback
 */
module.exports = function(callback) {
    var local = constants.META_DIR + constants.META_LOCAL;
    var remote = constants.META_DIR + constants.META_REMOTE;
    //Calculate changes and ask for confimation, add -f flag to not do that

    fs.readFile(remote, 'utf8', function(err, data) {
        if (err) {
            callback(err);
            return;
        }
        var result = JSON.parse(data);
        for (file of result['files']) {
            fs.writeFile(file.name + '.js', file.source, function() {});
        }
        fs.writeFile(local, data, function() {});
        callback();
        return;
    });
}

{'fraction_non_alphanumeric': 0.1386904761904762, 'fraction_numerical': 0.0011904761904761906, 'mean_word_length': 2.502083333333333, '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': '1980260', 'n_tokens_mistral': 501, 'n_tokens_neox': 493, 'n_words': 135}