* @see https://fetch.spec.whatwg.org/#concept-header-list-append * @param {string} name * @param {string} value * @param {boolean} isLowerCase
(name, value, isLowerCase)
| 12303 | _handler = new WeakMap(); |
| 12304 | _origin = new WeakMap(); |
| 12305 | module.exports = (interceptorOpts) => { |
| 12306 | var _a, _b, _c, _d, _e, _f, _g; |
| 12307 | if ((interceptorOpts == null ? void 0 : interceptorOpts.maxTTL) != null && (typeof (interceptorOpts == null ? void 0 : interceptorOpts.maxTTL) !== "number" || (interceptorOpts == null ? void 0 : interceptorOpts.maxTTL) < 0)) { |
| 12308 | throw new InvalidArgumentError("Invalid maxTTL. Must be a positive number"); |
| 12309 | } |
| 12310 | if ((interceptorOpts == null ? void 0 : interceptorOpts.maxItems) != null && (typeof (interceptorOpts == null ? void 0 : interceptorOpts.maxItems) !== "number" || (interceptorOpts == null ? void 0 : interceptorOpts.maxItems) < 1)) { |
| 12311 | throw new InvalidArgumentError( |
| 12312 | "Invalid maxItems. Must be a positive number and greater than zero" |
| 12313 | ); |
| 12314 | } |
| 12315 | if ((interceptorOpts == null ? void 0 : interceptorOpts.affinity) != null && (interceptorOpts == null ? void 0 : interceptorOpts.affinity) !== 4 && (interceptorOpts == null ? void 0 : interceptorOpts.affinity) !== 6) { |
| 12316 | throw new InvalidArgumentError("Invalid affinity. Must be either 4 or 6"); |
| 12317 | } |
| 12318 | if ((interceptorOpts == null ? void 0 : interceptorOpts.dualStack) != null && typeof (interceptorOpts == null ? void 0 : interceptorOpts.dualStack) !== "boolean") { |
| 12319 | throw new InvalidArgumentError("Invalid dualStack. Must be a boolean"); |
| 12320 | } |
| 12321 | if ((interceptorOpts == null ? void 0 : interceptorOpts.lookup) != null && typeof (interceptorOpts == null ? void 0 : interceptorOpts.lookup) !== "function") { |
| 12322 | throw new InvalidArgumentError("Invalid lookup. Must be a function"); |
| 12323 | } |
| 12324 | if ((interceptorOpts == null ? void 0 : interceptorOpts.pick) != null && typeof (interceptorOpts == null ? void 0 : interceptorOpts.pick) !== "function") { |
| 12325 | throw new InvalidArgumentError("Invalid pick. Must be a function"); |