MCPcopy Index your code
hub / github.com/cncjs/gcode-parser / loop

Function loop

src/index.js:50–59  ·  view source on GitHub ↗
(i = 0)

Source from the content-addressed store, hash-verified

48 opts.batchSize = opts.batchSize || 1;
49
50 const loop = (i = 0) => {
51 for (let count = 0; i < arr.length && count < opts.batchSize; ++i, ++count) {
52 iteratee(arr[i], i, arr);
53 }
54 if (i < arr.length) {
55 timers.setImmediate(() => loop(i));
56 return;
57 }
58 done();
59 };
60 loop();
61};
62

Callers 1

iterateArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected