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

Method register

lib/internal/modules/esm/loader.js:659–668  ·  view source on GitHub ↗

* @see AsyncLoaderHooks.register * @returns {any}

(specifier, parentURL, data, transferList, isInternal)

Source from the content-addressed store, hash-verified

657 * @returns {any}
658 */
659 register(specifier, parentURL, data, transferList, isInternal) {
660 if (!this.#asyncLoaderHooks) {
661 // On the loader hook worker thread, the #asyncLoaderHooks must already have been initialized
662 // to be an instance of AsyncLoaderHooksOnLoaderHookWorker, so this branch can only ever
663 // be hit on a non-loader-hook thread that will talk to the loader hook worker thread.
664 const { AsyncLoaderHooksProxiedToLoaderHookWorker } = require('internal/modules/esm/hooks');
665 this.#setAsyncLoaderHooks(new AsyncLoaderHooksProxiedToLoaderHookWorker());
666 }
667 return this.#asyncLoaderHooks.register(`${specifier}`, `${parentURL}`, data, transferList, isInternal);
668 }
669
670 /**
671 * Resolve a module request to a URL identifying the location of the module. Handles customization hooks,

Callers 15

runtime.pyFile · 0.45
utils.pyFile · 0.45
setMethod · 0.45
followCompositeSignalFunction · 0.45
timeoutMethod · 0.45
constructorMethod · 0.45
registerFunction · 0.45
setMethod · 0.45
_registerFunction · 0.45
createObjectFunction · 0.45

Calls 2

#setAsyncLoaderHooksMethod · 0.95
requireFunction · 0.50

Tested by

no test coverage detected