Download next.js/packages/next/src/server/lib/match-next-data-pathname.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 281 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/server/lib/match-next-data-pathname.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next/src/server/lib/match-next-data-pathname.ts
-
curl -L -o match-next-data-pathname.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/server/lib/match-next-data-pathname.ts
281 Bytes
| import { getPathMatch } from '../../shared/lib/router/utils/path-match' | |
| const matcher = getPathMatch('/_next/data/:path*') | |
| export function matchNextDataPathname(pathname: string | null | undefined) { | |
| if (typeof pathname !== 'string') return false | |
| return matcher(pathname) | |
| } | |