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

Function getPathRelativeToRootDirs

test/fixtures/snapshot/typescript.js:122614–122619  ·  view source on GitHub ↗
(path, rootDirs, getCanonicalFileName)

Source from the content-addressed store, hash-verified

122612 }
122613 }
122614 function getPathRelativeToRootDirs(path, rootDirs, getCanonicalFileName) {
122615 return ts.firstDefined(rootDirs, function (rootDir) {
122616 var relativePath = getRelativePathIfInDirectory(path, rootDir, getCanonicalFileName);
122617 return relativePath !== undefined && isPathRelativeToParent(relativePath) ? undefined : relativePath;
122618 });
122619 }
122620 function removeExtensionAndIndexPostFix(fileName, ending, options, host) {
122621 if (ts.fileExtensionIsOneOf(fileName, [".json" /* Extension.Json */, ".mjs" /* Extension.Mjs */, ".cjs" /* Extension.Cjs */]))
122622 return fileName;

Callers 1

Calls 2

isPathRelativeToParentFunction · 0.85

Tested by

no test coverage detected