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

Function loadESMIfNeeded

lib/internal/main/check_syntax.js:49–57  ·  view source on GitHub ↗
(cb)

Source from the content-addressed store, hash-verified

47}
48
49function loadESMIfNeeded(cb) {
50 const hasModulePreImport = getOptionValue('--import').length > 0;
51
52 if (hasModulePreImport) {
53 require('internal/modules/run_main').runEntryPointWithESMLoader(cb);
54 return;
55 }
56 cb();
57}
58
59async function checkSyntax(source, filename) {
60 let format;

Callers 1

check_syntax.jsFile · 0.85

Calls 3

getOptionValueFunction · 0.85
requireFunction · 0.50
cbFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…