MCPcopy
hub / github.com/TanStack/router / cleanPath

Function cleanPath

packages/router-generator/src/utils.ts:136–139  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

134}
135
136export function cleanPath(path: string) {
137 // remove double slashes
138 return path.replace(/\/{2,}/g, '/')
139}
140
141export function trimPathLeft(path: string) {
142 return path === '/' ? path : path.replace(/^\/{1,}/, '')

Callers 2

utils.test.tsFile · 0.90

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected