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

Method importModuleDynamically

lib/repl.js:474–479  ·  view source on GitHub ↗
(specifier, _, importAttributes, phase)

Source from the content-addressed store, hash-verified

472 // Continue regardless of error.
473 }
474 async function importModuleDynamically(specifier, _, importAttributes, phase) {
475 const cascadedLoader = require('internal/modules/esm/loader').getOrInitializeCascadedLoader();
476 return cascadedLoader.import(specifier, parentURL, importAttributes,
477 phase === 'evaluation' ? cascadedLoader.kEvaluationPhase :
478 cascadedLoader.kSourcePhase);
479 }
480 // `experimentalREPLAwait` is set to true by default.
481 // Shall be false in case `--no-experimental-repl-await` flag is used.
482 if (experimentalREPLAwait && StringPrototypeIncludes(code, 'await')) {

Callers

nothing calls this directly

Calls 2

importMethod · 0.80
requireFunction · 0.50

Tested by

no test coverage detected