Download Fore_End/cpcn2/node_modules/css-loader/dist/runtime/getUrl.js from zxy0307/JavaWeb: direct link, hf CLI and curl.
- Browser
- Download file 597 Bytes
-
https://huggingface.co/zxy0307/JavaWeb/resolve/main/Fore_End/cpcn2/node_modules/css-loader/dist/runtime/getUrl.js
- Command line
-
hf download hf://zxy0307/JavaWeb/Fore_End/cpcn2/node_modules/css-loader/dist/runtime/getUrl.js
-
curl -L -o getUrl.js https://huggingface.co/zxy0307/JavaWeb/resolve/main/Fore_End/cpcn2/node_modules/css-loader/dist/runtime/getUrl.js
597 Bytes
| ; | |
| module.exports = function (url, options) { | |
| if (!options) { | |
| options = {}; | |
| } | |
| if (!url) { | |
| return url; | |
| } | |
| url = String(url.__esModule ? url.default : url); | |
| // If url is already wrapped in quotes, remove them | |
| if (/^['"].*['"]$/.test(url)) { | |
| url = url.slice(1, -1); | |
| } | |
| if (options.hash) { | |
| url += options.hash; | |
| } | |
| // Should url be wrapped? | |
| // See https://drafts.csswg.org/css-values-3/#urls | |
| if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) { | |
| return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\""); | |
| } | |
| return url; | |
| }; |