MCPcopy Index your code
hub / github.com/TanStack/router / cleanPath

Function cleanPath

packages/router-core/src/path.ts:24–27  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

22
23/** Remove repeated slashes from a path string. */
24export function cleanPath(path: string) {
25 // remove double slashes
26 return path.replace(/\/{2,}/g, '/')
27}
28
29/** Trim leading slashes (except preserving root '/'). */
30export function trimPathLeft(path: string) {

Callers 3

RouterCoreClass · 0.90
joinPathsFunction · 0.70
resolvePathFunction · 0.70

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected