Download frontend/node_modules/@rolldown/pluginutils/dist/utils.js from Krooz/pyre_env: direct link, hf CLI and curl.
- Browser
- Download file 519 Bytes
-
https://huggingface.co/spaces/Krooz/pyre_env/resolve/main/frontend/node_modules/%40rolldown/pluginutils/dist/utils.js
- Command line
-
hf download hf://spaces/Krooz/pyre_env/frontend/node_modules/@rolldown/pluginutils/dist/utils.js
-
curl -L -o utils.js https://huggingface.co/spaces/Krooz/pyre_env/resolve/main/frontend/node_modules/%40rolldown/pluginutils/dist/utils.js
519 Bytes
| const postfixRE = /[?#].*$/; | |
| export function cleanUrl(url) { | |
| return url.replace(postfixRE, ''); | |
| } | |
| export function extractQueryWithoutFragment(url) { | |
| const questionMarkIndex = url.indexOf('?'); | |
| if (questionMarkIndex === -1) { | |
| return ''; | |
| } | |
| const fragmentIndex = url.indexOf('#', questionMarkIndex); // Search for # after ? | |
| if (fragmentIndex === -1) { | |
| return url.substring(questionMarkIndex); | |
| } | |
| else { | |
| return url.substring(questionMarkIndex, fragmentIndex); | |
| } | |
| } | |