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

Function shortPath

src/lib/http.ts:656–662  ·  view source on GitHub ↗

Extracts the path component from a full URL for concise log messages.

(pathOrUrl: string)

Source from the content-addressed store, hash-verified

654
655/** Extracts the path component from a full URL for concise log messages. */
656function shortPath(pathOrUrl: string): string {
657 try {
658 return new URL(pathOrUrl).pathname;
659 } catch {
660 return pathOrUrl;
661 }
662}
663
664export function buildUrl(
665 baseUrl: string,

Callers 1

requestWithMetaMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected