Download next.js/test/e2e/app-dir/app-prefetch/app/invalid-url/invalid-url.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 323 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-prefetch/app/invalid-url/invalid-url.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/app-prefetch/app/invalid-url/invalid-url.js
-
curl -L -o invalid-url.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-prefetch/app/invalid-url/invalid-url.js
323 Bytes
| // We need a URL that reliably fails `new URL(url, window.location) | |
| // This only fails if `window.location` starts with `https://`: | |
| // | |
| // const invalidUrl = 'http:' | |
| // | |
| // because `new URL('http:', 'http://localhost:3000')` works fine. | |
| // So better to pick something that's always invalid | |
| export const INVALID_URL = '///' | |