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

Function trimPath

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

Source from the content-addressed store, hash-verified

39
40/** Trim both leading and trailing slashes. */
41export function trimPath(path: string) {
42 return trimPathRight(trimPathLeft(path))
43}
44
45/** Remove a trailing slash from value when appropriate for comparisons. */
46export function removeTrailingSlash(value: string, basepath: string): string {

Callers 3

RouterCoreClass · 0.90
rewriteBasepathFunction · 0.90
RouteCompFunction · 0.90

Calls 2

trimPathRightFunction · 0.70
trimPathLeftFunction · 0.70

Tested by

no test coverage detected