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

Function tryRemovePrefix

test/fixtures/snapshot/typescript.js:2424–2427  ·  view source on GitHub ↗
(str, prefix, getCanonicalFileName)

Source from the content-addressed store, hash-verified

2422 }
2423 ts.removePrefix = removePrefix;
2424 function tryRemovePrefix(str, prefix, getCanonicalFileName) {
2425 if (getCanonicalFileName === void 0) { getCanonicalFileName = identity; }
2426 return startsWith(getCanonicalFileName(str), getCanonicalFileName(prefix)) ? str.substring(prefix.length) : undefined;
2427 }
2428 ts.tryRemovePrefix = tryRemovePrefix;
2429 function isPatternMatch(_a, candidate) {
2430 var prefix = _a.prefix, suffix = _a.suffix;

Callers

nothing calls this directly

Calls 2

getCanonicalFileNameFunction · 0.85
startsWithFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…