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

Function tryRemoveSuffix

test/fixtures/snapshot/typescript.js:2287–2289  ·  view source on GitHub ↗
(str, suffix)

Source from the content-addressed store, hash-verified

2285 }
2286 ts.removeSuffix = removeSuffix;
2287 function tryRemoveSuffix(str, suffix) {
2288 return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : undefined;
2289 }
2290 ts.tryRemoveSuffix = tryRemoveSuffix;
2291 function stringContains(str, substring) {
2292 return str.indexOf(substring) !== -1;

Callers

nothing calls this directly

Calls 2

endsWithFunction · 0.70
sliceMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…