MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / removeTrail

Function removeTrail

frontend/src/tools/string.ts:1–7  ·  view source on GitHub ↗
(origin: string, trail: string)

Source from the content-addressed store, hash-verified

1export function removeTrail(origin: string, trail: string) {
2 if (origin.endsWith(trail)) {
3 return origin.slice(0, origin.length - trail.length);
4 } else {
5 return origin;
6 }
7}

Callers 3

mapDaemonAddressFunction · 0.90
useFileManagerFunction · 0.90
makeSocketIoFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected