Download node_modules/@aws-sdk/protocol-http/dist-cjs/Field.js from sweet2004/bot: direct link, hf CLI and curl.
- Browser
- Download file 736 Bytes
-
https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/protocol-http/dist-cjs/Field.js
- Command line
-
hf download hf://spaces/sweet2004/bot/node_modules/@aws-sdk/protocol-http/dist-cjs/Field.js
-
curl -L -o Field.js https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/protocol-http/dist-cjs/Field.js
736 Bytes
| ; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| exports.Field = void 0; | |
| const FieldPosition_1 = require("./FieldPosition"); | |
| class Field { | |
| constructor({ name, kind = FieldPosition_1.FieldPosition.HEADER, values = [] }) { | |
| this.name = name; | |
| this.kind = kind; | |
| this.values = values; | |
| } | |
| add(value) { | |
| this.values.push(value); | |
| } | |
| set(values) { | |
| this.values = values; | |
| } | |
| remove(value) { | |
| this.values = this.values.filter((v) => v !== value); | |
| } | |
| toString() { | |
| return this.values.map((v) => (v.includes(",") || v.includes(" ") ? `"${v}"` : v)).join(", "); | |
| } | |
| get() { | |
| return this.values; | |
| } | |
| } | |
| exports.Field = Field; | |