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

Method eval

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

* * @param {string} source Source code of the module. * @param {string} url URL of the module. * @param {boolean} isEntryPoint Whether the module is the entry point. * @returns {Promise } The module object.

(source, url, isEntryPoint = false)

Source from the content-addressed store, hash-verified

247 * @returns {Promise<object>} The module object.
248 */
249 eval(source, url, isEntryPoint = false) {
250 const context = isEntryPoint ? { isMain: true } : undefined;
251 const wrap = this.createModuleWrap(source, url, context);
252 return this.executeModuleJob(url, wrap, isEntryPoint);
253 }
254
255 /**
256 * This constructs (creates, instantiates and evaluates) a module graph that

Callers 6

constructorMethod · 0.45
evalModuleEntryPointFunction · 0.45
completeFunction · 0.45
evalCommandFunction · 0.45

Calls 2

createModuleWrapMethod · 0.95
executeModuleJobMethod · 0.95

Tested by

no test coverage detected