MCPcopy
hub / github.com/vercel/next.js / hasBasePath

Function hasBasePath

packages/next/src/client/has-base-path.ts:5–7  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

3const basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''
4
5export function hasBasePath(path: string): boolean {
6 return pathHasPrefix(path, basePath)
7}

Callers 7

removeBasePathFunction · 0.90
initializeFunction · 0.90
RouterFunction · 0.90
serverActionReducerFunction · 0.90
matchesMiddlewareFunction · 0.90
changeMethod · 0.90
isLocalURLFunction · 0.90

Calls 1

pathHasPrefixFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…