Download next.js/packages/next/src/client/add-locale.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 469 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/client/add-locale.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next/src/client/add-locale.ts
-
curl -L -o add-locale.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/client/add-locale.ts
469 Bytes
| import type { addLocale as Fn } from '../shared/lib/router/utils/add-locale' | |
| import { normalizePathTrailingSlash } from './normalize-trailing-slash' | |
| export const addLocale: typeof Fn = (path, ...args) => { | |
| if (process.env.__NEXT_I18N_SUPPORT) { | |
| return normalizePathTrailingSlash( | |
| ( | |
| require('../shared/lib/router/utils/add-locale') as typeof import('../shared/lib/router/utils/add-locale') | |
| ).addLocale(path, ...args) | |
| ) | |
| } | |
| return path | |
| } | |