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

Method forEach

out/cli.cjs:10597–10613  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

10595 // with undefined values until we either "catch up" with elements that still
10596 // exist or reach the back of the queue.
10597 forEach(callback) {
10598 let i3 = this._cursor;
10599 let node = this._front;
10600 let elements = node._elements;
10601 while (i3 !== elements.length || node._next !== void 0) {
10602 if (i3 === elements.length) {
10603 node = node._next;
10604 elements = node._elements;
10605 i3 = 0;
10606 if (elements.length === 0) {
10607 break;
10608 }
10609 }
10610 callback(elements[i3]);
10611 ++i3;
10612 }
10613 }
10614 // Return the element that would be returned if shift() was called now,
10615 // without modifying the queue.
10616 peek() {

Callers

nothing calls this directly

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected