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

Function shouldUseModuleEntryPoint

lib/internal/process/execution.js:438–442  ·  view source on GitHub ↗

* @param {string} name - The filename of the script. * @param {string} body - The code of the script. * @returns {boolean} Whether the module entry point should be evaluated as a module.

(name, body)

Source from the content-addressed store, hash-verified

436 * @returns {boolean} Whether the module entry point should be evaluated as a module.
437 */
438function shouldUseModuleEntryPoint(name, body) {
439 return getOptionValue('--experimental-detect-module') &&
440 getOptionValue('--input-type') === '' &&
441 containsModuleSyntax(body, name, null, 'no CJS variables');
442}
443
444/**
445 *

Callers 2

evalScriptFunction · 0.85
evalTypeScriptFunction · 0.85

Calls 1

getOptionValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…