<commit_before>var cordova = require("cordova/exec");

var pluginName = "FabricCrashlyticsPlugin";

var names = [
"log",
"setBool",
"setDouble",
"setFloat",
"setInt",
"setUserIdentifier",
"setUserName",
"logException",
"crash"
];

var obj = {};

names.forEach(function(methodName) {
    obj[methodName] = function() {
        var args = Array.prototype.slice.call(arguments, 0);
        return new Promise(function(resolve, reject) {
            cordova(resolve, reject, pluginName, methodName, args);
        });
    };
});<commit_msg>Array.prototype.forEach を使わない<commit_after>var cordova = require("cordova/exec");

var pluginName = "FabricCrashlyticsPlugin";

var names = [
"log",
"setBool",
"setDouble",
"setFloat",
"setInt",
"setUserIdentifier",
"setUserName",
"logException",
"crash"
];

var obj = {};

for (var i = 0; i < names.length; i++) {
    obj[names[i]] = function() {
        var args = Array.prototype.slice.call(arguments, 0);
        return new Promise(function(resolve, reject) {
            cordova(resolve, reject, pluginName, methodName, args);
        });
    };
}
{'fraction_non_alphanumeric': 0.16636029411764705, 'fraction_numerical': 0.0027573529411764708, 'mean_word_length': 4.041666666666667, 'pattern_counts': {'":': 0, '<': 4, '<?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': '1158130', 'n_tokens_mistral': 369, 'n_tokens_neox': 360, 'n_words': 77}