Download next.js/packages/next/src/shared/lib/page-path/normalize-path-sep.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 257 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/shared/lib/page-path/normalize-path-sep.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next/src/shared/lib/page-path/normalize-path-sep.ts
-
curl -L -o normalize-path-sep.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/shared/lib/page-path/normalize-path-sep.ts
257 Bytes
| /** | |
| * For a given page path, this function ensures that there is no backslash | |
| * escaping slashes in the path. Example: | |
| * - `foo\/bar\/baz` -> `foo/bar/baz` | |
| */ | |
| export function normalizePathSep(path: string): string { | |
| return path.replace(/\\/g, '/') | |
| } | |