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

Function matchPathname

packages/router-core/tests/optional-path-params.test.ts:358–372  ·  view source on GitHub ↗
(
    from: string,
    options: { to: string; caseSensitive?: boolean; fuzzy?: boolean },
  )

Source from the content-addressed store, hash-verified

356 path: '/',
357 })
358 const matchPathname = (
359 from: string,
360 options: { to: string; caseSensitive?: boolean; fuzzy?: boolean },
361 ) => {
362 const match = findSingleMatch(
363 options.to,
364 options.caseSensitive ?? false,
365 options.fuzzy ?? false,
366 from,
367 processedTree,
368 )
369 const result = match ? match.rawParams : undefined
370 if (options.to && !result) return
371 return result ?? {}
372 }
373
374 describe('matchPathname with optional params', () => {
375 it.each([

Callers 1

Calls 1

findSingleMatchFunction · 0.90

Tested by

no test coverage detected