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

Function removePrefix

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

Source from the content-addressed store, hash-verified

2418 }
2419 ts.startsWith = startsWith;
2420 function removePrefix(str, prefix) {
2421 return startsWith(str, prefix) ? str.substr(prefix.length) : str;
2422 }
2423 ts.removePrefix = removePrefix;
2424 function tryRemovePrefix(str, prefix, getCanonicalFileName) {
2425 if (getCanonicalFileName === void 0) { getCanonicalFileName = identity; }

Callers

nothing calls this directly

Calls 1

startsWithFunction · 0.70

Tested by

no test coverage detected