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

Function loadBuiltinModule

lib/internal/modules/helpers.js:120–130  ·  view source on GitHub ↗

* Provide one of Node.js' public modules to user code. * @param {string} id - The identifier/specifier of the builtin module to load * @returns {object|undefined}

(id)

Source from the content-addressed store, hash-verified

118 * @returns {object|undefined}
119 */
120function loadBuiltinModule(id) {
121 if (!BuiltinModule.canBeRequiredByUsers(id)) {
122 return;
123 }
124 /** @type {import('internal/bootstrap/realm.js').BuiltinModule} */
125 const mod = BuiltinModule.map.get(id);
126 debug('load built-in module %s', id);
127 // compileForPublicLoader() throws if canBeRequiredByUsers is false:
128 mod.compileForPublicLoader();
129 return mod;
130}
131
132let isSEABuiltinWarningNeeded_;
133function isSEABuiltinWarningNeeded() {

Callers 3

translators.jsFile · 0.85
loadBuiltinWithHooksFunction · 0.85

Calls 4

canBeRequiredByUsersMethod · 0.80
getMethod · 0.65
debugFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…