MCPcopy Create free account
hub / github.com/arktypeio/arktype / withoutBase

Function withoutBase

ark/docs/lib/basePath.ts:20–23  ·  view source on GitHub ↗
(pathname: string)

Source from the content-addressed store, hash-verified

18
19/** a served pathname, like location.pathname, as the page url it serves */
20export const withoutBase = (pathname: string): string =>
21 basePath && pathname.startsWith(basePath) ?
22 pathname.slice(basePath.length) || "/"
23 : pathname

Callers 2

homeSectionOfFunction · 0.90
followFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected