<commit_before>/**
 * @module sandbox-timers
 * This module's job is to expose stub timer functions that raise warning when called.
 * @type {Object}
 */

var timerFunctions = ['setTimeout', 'setInterval', 'clearTimeout', 'clearInterval', 'setImmediate'],
    MESSAGE = ' is not available inside sandbox and has no side-effect.',

    SandboxTimers;

SandboxTimers = function (console) {
    var notSupported = function (name) {
        console.info(name + MESSAGE);
    };

    timerFunctions.forEach(function (name) {
        this[name] = notSupported.bind(name);
    }.bind(this));
};

module.exports = SandboxTimers;<commit_msg>Fix binding issue of the stub timers.<commit_after>/**
 * @module sandbox-timers
 * This module's job is to expose stub timer functions that raise warning when called.
 * @type {Object}
 */

var timerFunctions = ['setTimeout', 'setInterval', 'clearTimeout', 'clearInterval', 'setImmediate'],
    MESSAGE = ' is not available inside sandbox and has no side-effect.',

    SandboxTimers;

SandboxTimers = function (console) {
    var notSupported = function (name) {
        console.info(name + MESSAGE);
    };

    timerFunctions.forEach(function (name) {
        this[name] = notSupported.bind({}, name);
    }.bind(this));
};

module.exports = SandboxTimers;
{'fraction_non_alphanumeric': 0.12848297213622292, 'fraction_numerical': 0.0, 'mean_word_length': 3.842696629213483, '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': '7217954', 'n_tokens_mistral': 385, 'n_tokens_neox': 369, 'n_words': 112}