Download node_modules/@aws-sdk/querystring-parser/dist-cjs/index.js from sweet2004/bot: direct link, hf CLI and curl.
- Browser
- Download file 842 Bytes
-
https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/querystring-parser/dist-cjs/index.js
- Command line
-
hf download hf://spaces/sweet2004/bot/node_modules/@aws-sdk/querystring-parser/dist-cjs/index.js
-
curl -L -o index.js https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/querystring-parser/dist-cjs/index.js
842 Bytes
| ; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| exports.parseQueryString = void 0; | |
| function parseQueryString(querystring) { | |
| const query = {}; | |
| querystring = querystring.replace(/^\?/, ""); | |
| if (querystring) { | |
| for (const pair of querystring.split("&")) { | |
| let [key, value = null] = pair.split("="); | |
| key = decodeURIComponent(key); | |
| if (value) { | |
| value = decodeURIComponent(value); | |
| } | |
| if (!(key in query)) { | |
| query[key] = value; | |
| } | |
| else if (Array.isArray(query[key])) { | |
| query[key].push(value); | |
| } | |
| else { | |
| query[key] = [query[key], value]; | |
| } | |
| } | |
| } | |
| return query; | |
| } | |
| exports.parseQueryString = parseQueryString; | |