<commit_before>/*
 * Traceur and Babel transpile hook for Loader
 */
(function(Loader) {
  // Returns an array of ModuleSpecifiers
  var transpiler, transpilerModule;
  var isNode = typeof window == 'undefined' && typeof WorkerGlobalScope == 'undefined';

  // use Traceur by default
  Loader.prototype.transpiler = 'traceur';

  Loader.prototype.transpile = function(load) {
    if (!transpiler) {
      if (this.transpiler == 'babel') {
        transpiler = babelTranspile;
        transpilerModule = isNode ? require('babel-core') : __global.babel;
      }
      else {
        transpiler = traceurTranspile;
        transpilerModule = isNode ? require('traceur') : __global.traceur;
      }
      
      if (!transpilerModule)
        throw new TypeError('Include Traceur or Babel for module syntax support.');
    }

    return 'var __moduleAddress = "' + load.address + '";' + transpiler.call(this, load);
  }

  function traceurTranspile(load) {
    var options = this.traceurOptions || {};
    options.modules = 'instantiate';
    options.script = false;
    options.sourceMaps = 'inline';
    options.filename = load.address;<commit_msg>support input source maps (#314)<commit_after>/*
 * Traceur and Babel transpile hook for Loader
 */
(function(Loader) {
  // Returns an array of ModuleSpecifiers
  var transpiler, transpilerModule;
  var isNode = typeof window == 'undefined' && typeof WorkerGlobalScope == 'undefined';

  // use Traceur by default
  Loader.prototype.transpiler = 'traceur';

  Loader.prototype.transpile = function(load) {
    if (!transpiler) {
      if (this.transpiler == 'babel') {
        transpiler = babelTranspile;
        transpilerModule = isNode ? require('babel-core') : __global.babel;
      }
      else {
        transpiler = traceurTranspile;
        transpilerModule = isNode ? require('traceur') : __global.traceur;
      }
      
      if (!transpilerModule)
        throw new TypeError('Include Traceur or Babel for module syntax support.');
    }

    return 'var __moduleAddress = "' + load.address + '";' + transpiler.call(this, load);
  }

  function traceurTranspile(load) {
    var options = this.traceurOptions || {};
    options.modules = 'instantiate';
    options.script = false;
    options.sourceMaps = 'inline';
    options.filename = load.address;
    options.inputSourceMap = load.metadata.sourceMap;
{'fraction_non_alphanumeric': 0.1175475687103594, 'fraction_numerical': 0.0012684989429175475, 'mean_word_length': 3.15817223198594, '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': '2710892', 'n_tokens_mistral': 727, 'n_tokens_neox': 693, 'n_words': 169}