<commit_before>module.exports = {
  LiveModules: function (requires) {
    var self = this,
      dir = __dirname,
      gaze = require('gaze');
    this.require = function (mod, vrr, callback) {
      if (typeof mod === 'string' && typeof vrr  === 'string') {
        gaze(['js','json','node'].indexOf(mod.split('.').pop()) !== -1 ? requires.resolve(mod) : requires.resolve(mod) + '/*', function () {
          this.on('all', function() {
            delete requires.cache[requires.resolve(mod)];
            try {
              global[vrr] = requires(mod);
              typeof callback === 'function' ? callback('', vrr, mod, 'updated') : null;
            } catch (err) {
              typeof callback === 'function' ? callback(err, vrr, mod, 'update_failed') : null;
            }
          });
        });
        global[vrr] = requires(mod);
        typeof callback === 'function' ? callback('', vrr, mod, 'loaded') : null;
      }
    }
  },
  createLiveModules: function (requires) {
    return new this.LiveModules(requires);
  }
};<commit_msg>added support for custom registered extensions<commit_after>module.exports = {
  LiveModules: function (requires) {
    var self = this,
      dir = __dirname,
      gaze = require('gaze');
    this.require = function (mod, vrr, callback) {
      if (typeof mod === 'string' && typeof vrr  === 'string') {
        gaze(Object.keys(requires.extensions).indexOf(mod.split('.').pop()) !== -1 ? requires.resolve(mod) : requires.resolve(mod) + '/*', function () {
          this.on('all', function() {
            delete requires.cache[requires.resolve(mod)];
            try {
              global[vrr] = requires(mod);
              typeof callback === 'function' ? callback('', vrr, mod, 'updated') : null;
            } catch (err) {
              typeof callback === 'function' ? callback(err, vrr, mod, 'update_failed') : null;
            }
          });
        });
        global[vrr] = requires(mod);
        typeof callback === 'function' ? callback('', vrr, mod, 'loaded') : null;
      }
    }
  },
  createLiveModules: function (requires) {
    return new this.LiveModules(requires);
  }
};
{'fraction_non_alphanumeric': 0.1727821644217371, 'fraction_numerical': 0.0009289363678588017, 'mean_word_length': 2.365625, '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': '6549120', 'n_tokens_mistral': 625, 'n_tokens_neox': 619, 'n_words': 143}