Add a require object if it does not already exist
420994
def add_require(self, require):
        
        for p in self.requires:
            if p.value == require.value:
                return
        self.requires.append(require)
1034235
function hasModule (name) {
    // throw error on invalid name
    requireValidName(name)
    // check if module exists
    return defined(immutable.modules[name]) ? true : false
}
434291
function(name) {
    if (cache[name]) {
        return cache[name]
    } else {
        if (require) {
            return require(name)
        } else if (window.require) {
            return window.require(name)

        } else {
            throw new Error("Cannot find module " + name)
        }
    }
}
1225486
def require(obj, caller_args=[]):
    
    line, module = get_module_and_line('__spec__')
    src_params = ExpectParams(line, module)

    require_obj = RequireAssert(
        obj,
        src_params=src_params,
        caller_args=caller_args
    )
    _add_expect_to_wrapper(require_obj)
    return require_obj
47384
def check_exists(required, input)
      required.inject(true) do |result, key|
        input[key] && result
      end
    end
768270
function require(name, jumped){
    if (cache[name]) return cache[name].exports;
    if (modules[name]) return call(name, require);
    throw new Error('cannot find module "' + name + '"');
  }
319346
function makeRequire(m, self) {
    function _require(_path) {
        return m.require(_path);
    }

    _require.resolve = function(request) {
        return _module._resolveFilename(request, self);
    };
    _require.cache = _module._cache;
    _require.extensions = _module._extensions;

    return _require;
}
1218104
function _requireModule(rootPath, name) {
  let modulePath = _normalizeRequire(rootPath, name),
    moduleRes;
  try {
    moduleRes = require(modulePath);
  } catch (e) {
    if (e.code === 'MODULE_NOT_FOUND' && e.message.indexOf(name) !== -1) {
      try {
        moduleRes = require(name);
      } catch (e) {
        if (e.code === 'MODULE_NOT_FOUND' && e.message.indexOf(name) !== -1) {
          throw "NOT_FOUND";
        }
        throw e;
      }
    } else {
      throw e;
    }
  }
  return moduleRes;
}
1099731
function (lib) {
            var found = false,
                exists = false,
                path = "./nodes/"+lib+".js";

            if ( !nodes[lib] ) {

                // Try built-in if the file exists
                try {
                    exists = fs.statSync(__dirname + "/" + path);
                } catch (x) {
                    exists = false;
                }

                if( exists && exists.isFile() ) {
                    found = true;
                    try {
                        nodes[lib] = require(path);
                    } catch (z) {
                        log.throw("core", "Requested node \"" + lib + "\" could not be imported. Check that its dependecies is installed.\n\nStack:\n\n"+  z.stack);
                    }
                }

                if ( !found ) {
                    try {
                        // Try external
                        nodes[lib] = require(lib);
                    } catch (y) {
                        log.throw("core", "Requested node \"" + lib + "\" not available (2). Try `npm install " + lib + "`\n\n");
                    }
                }
            }
        }
1327642
function require (id, parentId) {
    var originalInputId = id; // for "not found" error message
    if (id.charAt(0) === '.') {
      id = normalizeId(id, parentId);
    }
    if (!require.modules.hasOwnProperty(id)) {
      throw new Error('module not found '+JSON.stringify(originalInputId));
    }
    var mod = require.modules[id];
    if (mod.exports === undefined) {
      var _require = function (_id) {
        //console.log('_require', _id, 'from', id);
        return require(_id, id);
      };
      defineConstant(_require, 'main', require.main);
      var block = mod.block; delete mod.block;
      mod.exports = {};
      if (require.initFilter) {
        block = require.initFilter(block);
      }
      block(_require, mod, mod.exports);
    }
    return mod.exports;
  }
95457
function required (key) {
  if (missing(key)) {
    throw new ReferenceError(format(REQUIRED_ERROR, key))
  } else {
    return get(key)
  }
}
622768
function requireFunc() {
    if (typeof arguments[0] === 'string') {
      const dep = arguments[0];
      const got = defined(dep);
      if (got) return got.val;
      throw new Error(`commonjs dependency "${dep}" is not prepared.`);
    }

    return requirejs.apply(null, arguments);
  }
1262602
function tryLoad(path: string) {
  try {
    return require(path);
  } catch (err) {
    if (err.code === MODULE_NOT_FOUND) {
      return null;
    }
    throw err;
  }
}
1191387
function (options, callback) {
        options = extend({}, MODULE_LOADER_DEFAULTS, options)
        var modulesFolder = options.uri

        iterateFiles(modulesFolder, loadModule, callback, isJsFile)

        function loadModule(fileName) {
            if (options.skip && options.skip.test(fileName)) {
                return
            }
            var module = require(fileName)
            var name = path.relative(options.uri, fileName)
            options.core.add(name, module)
        }
    }
28789
function require(...names) {
		const unknown = names.filter(name => !options[name]);
		if (unknown.length > 0) {
			throw new MrmUndefinedOption(`Required config options are missed: ${unknown.join(', ')}.`, {
				unknown,
			});
		}
		return config;
	}
731503
function make_reqfunc(module) {
  if (null == module) return null

  var reqfunc = module.require.bind(module)
  reqfunc.module = module.id
  return reqfunc
}
944406
def required(self, method, _dict, require):
        
        for key in require:
            if key not in _dict:
                raise LunrError("'%s' is required argument for method '%s'"
                                % (key, method))