Download next.js/packages/next/src/server/normalizers/request/base-path.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 410 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/server/normalizers/request/base-path.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next/src/server/normalizers/request/base-path.ts
-
curl -L -o base-path.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/server/normalizers/request/base-path.ts
410 Bytes
| import type { PathnameNormalizer } from './pathname-normalizer' | |
| import { PrefixPathnameNormalizer } from './prefix' | |
| export class BasePathPathnameNormalizer | |
| extends PrefixPathnameNormalizer | |
| implements PathnameNormalizer | |
| { | |
| constructor(basePath: string) { | |
| if (!basePath || basePath === '/') { | |
| throw new Error('Invariant: basePath must be set and cannot be "/"') | |
| } | |
| super(basePath) | |
| } | |
| } | |