Download next.js/packages/next/src/client/has-base-path.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 241 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/client/has-base-path.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next/src/client/has-base-path.ts
-
curl -L -o has-base-path.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/client/has-base-path.ts
241 Bytes
| import { pathHasPrefix } from '../shared/lib/router/utils/path-has-prefix' | |
| const basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || '' | |
| export function hasBasePath(path: string): boolean { | |
| return pathHasPrefix(path, basePath) | |
| } | |