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

Function getBuiltinModule

lib/internal/modules/helpers.js:401–405  ·  view source on GitHub ↗

* Load a public built-in module. ID may or may not be prefixed by `node:` and * will be normalized. * @param {string} id ID of the built-in to be loaded. * @returns {object|undefined} exports of the built-in. Undefined if the built-in * does not exist.

(id)

Source from the content-addressed store, hash-verified

399 * does not exist.
400 */
401function getBuiltinModule(id) {
402 validateString(id, 'id');
403 const normalizedId = BuiltinModule.normalizeRequirableId(id);
404 return normalizedId ? require(normalizedId) : undefined;
405}
406
407/** @type {import('internal/util/types')} */
408let _TYPES = null;

Callers

nothing calls this directly

Calls 2

normalizeRequirableIdMethod · 0.80
requireFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…