MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / iterate

Function iterate

out/cli.cjs:24430–24444  ·  view source on GitHub ↗
(list, iterator2, state2, callback)

Source from the content-addressed store, hash-verified

24428 var abort = require_abort();
24429 module2.exports = iterate;
24430 function iterate(list, iterator2, state2, callback) {
24431 var key = state2["keyedList"] ? state2["keyedList"][state2.index] : state2.index;
24432 state2.jobs[key] = runJob(iterator2, key, list[key], function(error, output) {
24433 if (!(key in state2.jobs)) {
24434 return;
24435 }
24436 delete state2.jobs[key];
24437 if (error) {
24438 abort(state2);
24439 } else {
24440 state2.results[key] = output;
24441 }
24442 callback(error, state2.results);
24443 });
24444 }
24445 function runJob(iterator2, key, item, callback) {
24446 var aborter;
24447 if (iterator2.length == 2) {

Callers 2

parallelFunction · 0.85
serialOrderedFunction · 0.85

Calls 3

runJobFunction · 0.85
abortFunction · 0.85
callbackFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…