MCPcopy Create free account
hub / github.com/angular/dev-infra / append

Method append

github-actions/browserstack/set-browserstack-env.js:12305–12322  ·  view source on GitHub ↗

* @see https://fetch.spec.whatwg.org/#concept-header-list-append * @param {string} name * @param {string} value * @param {boolean} isLowerCase

(name, value, isLowerCase)

Source from the content-addressed store, hash-verified

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");

Callers

nothing calls this directly

Calls 3

getMethod · 0.45
setMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected