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

Function lazyOption

lib/internal/process/warning.js:40–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40function lazyOption() {
41 // This will load `warningFile` only once. If the flag is not set,
42 // `warningFile` will be set to an empty string.
43 if (warningFile === undefined) {
44 const diagnosticDir = getOptionValue('--diagnostic-dir');
45 const redirectWarnings = getOptionValue('--redirect-warnings');
46 warningFile = diagnosticDir || redirectWarnings || '';
47 }
48 return warningFile;
49}
50
51// If we can't write to stderr, we'd like to make this a noop,
52// so use console.error.

Callers 1

onWarningFunction · 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…