Download node_modules/@aws-sdk/protocol-http/dist-cjs/Fields.js from sweet2004/bot: direct link, hf CLI and curl.
- Browser
- Download file 666 Bytes
-
https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/protocol-http/dist-cjs/Fields.js
- Command line
-
hf download hf://spaces/sweet2004/bot/node_modules/@aws-sdk/protocol-http/dist-cjs/Fields.js
-
curl -L -o Fields.js https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/protocol-http/dist-cjs/Fields.js
666 Bytes
| ; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| exports.Fields = void 0; | |
| class Fields { | |
| constructor({ fields = [], encoding = "utf-8" }) { | |
| this.entries = {}; | |
| fields.forEach(this.setField.bind(this)); | |
| this.encoding = encoding; | |
| } | |
| setField(field) { | |
| this.entries[field.name.toLowerCase()] = field; | |
| } | |
| getField(name) { | |
| return this.entries[name.toLowerCase()]; | |
| } | |
| removeField(name) { | |
| delete this.entries[name.toLowerCase()]; | |
| } | |
| getByType(kind) { | |
| return Object.values(this.entries).filter((field) => field.kind === kind); | |
| } | |
| } | |
| exports.Fields = Fields; | |