Download node_modules/@aws-sdk/shared-ini-file-loader/dist-cjs/getProfileData.js from sweet2004/bot: direct link, hf CLI and curl.
- Browser
- Download file 457 Bytes
-
https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/shared-ini-file-loader/dist-cjs/getProfileData.js
- Command line
-
hf download hf://spaces/sweet2004/bot/node_modules/@aws-sdk/shared-ini-file-loader/dist-cjs/getProfileData.js
-
curl -L -o getProfileData.js https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/shared-ini-file-loader/dist-cjs/getProfileData.js
457 Bytes
| ; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| exports.getProfileData = void 0; | |
| const profileKeyRegex = /^profile\s(["'])?([^\1]+)\1$/; | |
| const getProfileData = (data) => Object.entries(data) | |
| .filter(([key]) => profileKeyRegex.test(key)) | |
| .reduce((acc, [key, value]) => ({ ...acc, [profileKeyRegex.exec(key)[2]]: value }), { | |
| ...(data.default && { default: data.default }), | |
| }); | |
| exports.getProfileData = getProfileData; | |