Download next.js/packages/next/src/shared/lib/is-internal.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 742 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/shared/lib/is-internal.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next/src/shared/lib/is-internal.ts
-
curl -L -o is-internal.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/shared/lib/is-internal.ts
742 Bytes
| /** React that's compiled with `next`. Used by App Router. */ | |
| export const reactVendoredRe = | |
| /[\\/]next[\\/]dist[\\/]compiled[\\/](react|react-dom|react-server-dom-(webpack|turbopack)|scheduler)[\\/]/ | |
| /** React the user installed. Used by Pages Router, or user imports in App Router. */ | |
| export const reactNodeModulesRe = | |
| /node_modules[\\/](react|react-dom|scheduler)[\\/]/ | |
| export const nextInternalsRe = | |
| /(node_modules[\\/]next[\\/]|[\\/].next[\\/]static[\\/]chunks[\\/]webpack\.js$|(edge-runtime-webpack|webpack-runtime)\.js$)/ | |
| export default function isInternal(file: string | null) { | |
| if (!file) return false | |
| return ( | |
| nextInternalsRe.test(file) || | |
| reactVendoredRe.test(file) || | |
| reactNodeModulesRe.test(file) | |
| ) | |
| } | |