Download next.js/packages/next/src/shared/lib/utils/error-once.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 254 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/shared/lib/utils/error-once.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next/src/shared/lib/utils/error-once.ts
-
curl -L -o error-once.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/shared/lib/utils/error-once.ts
254 Bytes
| let errorOnce = (_: string) => {} | |
| if (process.env.NODE_ENV !== 'production') { | |
| const errors = new Set<string>() | |
| errorOnce = (msg: string) => { | |
| if (!errors.has(msg)) { | |
| console.error(msg) | |
| } | |
| errors.add(msg) | |
| } | |
| } | |
| export { errorOnce } | |