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

Function tryExtension

test/fixtures/snapshot/typescript.js:43614–43617  ·  view source on GitHub ↗
(ext)

Source from the content-addressed store, hash-verified

43612 return tryExtension(".json" /* Extension.Json */);
43613 }
43614 function tryExtension(ext) {
43615 var path = tryFile(candidate + ext, onlyRecordFailures, state);
43616 return path === undefined ? undefined : { path: path, ext: ext };
43617 }
43618 }
43619 /** Return the file if it exists. */
43620 function tryFile(fileName, onlyRecordFailures, state) {

Callers 1

tryAddingExtensionsFunction · 0.85

Calls 1

tryFileFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…