MCPcopy Index your code
hub / github.com/nodejs/node / requireBuiltin

Function requireBuiltin

lib/internal/bootstrap/realm.js:429–439  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

427};
428
429function requireBuiltin(id) {
430 if (id === selfId) {
431 return loaderExports;
432 }
433
434 const mod = BuiltinModule.map.get(id);
435 // Can't load the internal errors module from here, have to use a raw error.
436 // eslint-disable-next-line no-restricted-syntax
437 if (!mod) throw new TypeError(`Missing internal module '${id}'`);
438 return mod.compileForInternalLoader();
439}
440
441// Allow internal modules from dependencies to require
442// other modules from dependencies by providing fallbacks.

Callers 3

realm.jsFile · 0.85
setupPrepareStackTraceFunction · 0.85

Calls 2

getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…