<commit_before>var vm = require("vm");
var createScript = vm.createScript;
var compile = require("./compiler.js").compile;

// Enable import and export statements in the default Node REPL.
// Custom REPLs can still define their own eval functions that circumvent
// this compilation step, but that's a feature not a drawback.
vm.createScript = function (code, options) {
  return createScript.call(vm, compile(code), options);
};<commit_msg>Avoid wrapping vm.createScript more than once.<commit_after>var vm = require("vm");
var createScript = vm.createScript;
if (createScript.reified) {
  return;
}

var compile = require("./compiler.js").compile;

// Enable import and export statements in the default Node REPL.
// Custom REPLs can still define their own eval functions that circumvent
// this compilation step, but that's a feature not a drawback.
vm.createScript = function (code, options) {
  return createScript.call(vm, compile(code), options);
};

// Preserve the original createScript function just in case anyone needs
// to use or restore it.
vm.createScript.reified = createScript;
{'fraction_non_alphanumeric': 0.10319634703196347, 'fraction_numerical': 0.0, 'mean_word_length': 4.678756476683938, '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': '1006340', 'n_tokens_mistral': 297, 'n_tokens_neox': 289, 'n_words': 121}