MCPcopy Create free account
hub / github.com/cameri/nostream / joinPathPrefix

Function joinPathPrefix

src/utils/http.ts:114–119  ·  view source on GitHub ↗
(prefix: string, path: string)

Source from the content-addressed store, hash-verified

112}
113
114export const joinPathPrefix = (prefix: string, path: string): string => {
115 const normalizedPrefix = prefix.replace(/\/+$/, '')
116 const normalizedPath = path.startsWith('/') ? path : `/${path}`
117
118 return `${normalizedPrefix}${normalizedPath}`
119}

Callers 2

http.spec.tsFile · 0.90
rootRequestHandlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected