MCPcopy
hub / github.com/di-sukharev/opencommit / forEach

Method forEach

out/cli.cjs:6496–6507  ·  view source on GitHub ↗

* Iterate over all headers * * @param Function callback Executed for each item with parameters (value, name, thisArg) * @param Boolean thisArg `this` context for callback function * @return Void

(callback)

Source from the content-addressed store, hash-verified

6494 * @return Void
6495 */
6496 forEach(callback) {
6497 let thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : void 0;
6498 let pairs = getHeaders2(this);
6499 let i3 = 0;
6500 while (i3 < pairs.length) {
6501 var _pairs$i = pairs[i3];
6502 const name = _pairs$i[0], value = _pairs$i[1];
6503 callback.call(thisArg, value, name, this);
6504 pairs = getHeaders2(this);
6505 i3++;
6506 }
6507 }
6508 /**
6509 * Overwrite header values given name
6510 *

Callers

nothing calls this directly

Calls 1

getHeaders2Function · 0.85

Tested by

no test coverage detected