<commit_before>'use strict';

var fs = require('fs');
var helpers = require('./helpers');

var compatible = module.exports = {};

compatible.get = function get(id, overrides) {
  helpers.checkMinArgs(arguments, 1);

  return this.resolve(id, overrides);
};

compatible.load = function load(id) {
  var file = fs.statSync;

  helpers.checkMinArgs(arguments, 1);
  helpers.checkMustBeString(id, 'id');

  if (file(id).isDirectory()) {
    this.registerFolder(id, true);
    return this;
  }

  this.registerModule(id, true);
  return this;
};<commit_msg>feat(lib): update .load() to use the new .registerFiles()<commit_after>'use strict';

var fs = require('fs');
var path = require('path');
var helpers = require('./helpers');

var compatible = module.exports = {};

compatible.get = function get(id, overrides) {
  helpers.checkMinArgs(arguments, 1);

  return this.resolve(id, overrides);
};

compatible.load = function load(id) {
  var file = fs.statSync;

  helpers.checkMinArgs(arguments, 1);
  helpers.checkMustBeString(id, 'id');

  if (file(id).isDirectory()) {
    this.registerFiles(path.join(id, '*.js'), true);
    return this;
  }

  this.registerModule(id, true);
  return this;
};
{'fraction_non_alphanumeric': 0.16499162479061977, 'fraction_numerical': 0.0033500837520938024, 'mean_word_length': 4.506912442396313, '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': '6768408', 'n_tokens_mistral': 404, 'n_tokens_neox': 393, 'n_words': 91}