MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / trimTrailingSlash

Function trimTrailingSlash

src/lib/http.ts:651–653  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

649}
650
651function trimTrailingSlash(url: string): string {
652 return url.endsWith('/') ? url.slice(0, -1) : url;
653}
654
655/** Extracts the path component from a full URL for concise log messages. */
656function shortPath(pathOrUrl: string): string {

Callers 2

constructorMethod · 0.85
buildUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected