src/evaluator/modules.js
function initialize(shell) {
  shell.requiredModules = {};
  shell.installedModules = {};

  shell.state.require = function(name) {
    return customRequire(shell, name);
  };

  shell.registerCommand('module', moduleCommand);
  shell.registerCommand('modules', modulesCommand);
}
function initialize(shell) {
  shell.requiredModules = {};
  shell.installedModules = {};

  shell.state.require = function(name) {
    return customRequire(shell, name);
  };

  shell.registerCommand('module', moduleCommand);
  shell.registerCommand('modules', modulesCommand);
}
Initializes the shell with module related functionality. - The required and installed modules are tracked, and an implementation of a shell-scoped require is created. - The %module and %modules commands are also registered with the shell.