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

Function removeSuffix

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

Source from the content-addressed store, hash-verified

2281 }
2282 ts.endsWith = endsWith;
2283 function removeSuffix(str, suffix) {
2284 return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : str;
2285 }
2286 ts.removeSuffix = removeSuffix;
2287 function tryRemoveSuffix(str, suffix) {
2288 return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : undefined;

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…