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

Function importModuleDynamicallyForEmbedder

lib/internal/modules/esm/utils.js:248–251  ·  view source on GitHub ↗

* Get the built-in module dynamically for embedder ESM. * @param {string} specifier - The module specifier string. * @param {number} phase - The module import phase. Ignored for now. * @param {Record } attributes - The import attributes object. Ignored for now. * @param {string|nu

(specifier, phase, attributes, referrerName)

Source from the content-addressed store, hash-verified

246 * @returns {import('internal/modules/esm/loader.js').ModuleExports} - The imported module object.
247 */
248function importModuleDynamicallyForEmbedder(specifier, phase, attributes, referrerName) {
249 // Ignore phase and attributes for embedder ESM for now, because this only supports loading builtins.
250 return getBuiltinModuleWrapForEmbedder(specifier).getNamespace();
251}
252
253/**
254 * Asynchronously imports a module dynamically using a callback function. The native callback.

Callers 1

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…