MCPcopy Create free account
hub / github.com/code-forge-io/react-router-devtools / firstPathSegment

Function firstPathSegment

docs/app/utils/version-resolvers.ts:40–42  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

38}
39
40function firstPathSegment(request: Request) {
41 return new URL(request.url).pathname.split("/").filter(Boolean)[0]
42}
43
44export function resolveVersionForLayout(version: string | undefined, request: Request) {
45 if (isKnownVersion(version)) return { version }

Callers 1

resolveVersionForLayoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…