MCPcopy
hub / github.com/flatiron/director / _asyncEverySeries

Function _asyncEverySeries

lib/director/router.js:40–63  ·  view source on GitHub ↗
(arr, iterator, callback)

Source from the content-addressed store, hash-verified

38// in series in the browser and the server.
39//
40function _asyncEverySeries (arr, iterator, callback) {
41 if (!arr.length) {
42 return callback();
43 }
44
45 var completed = 0;
46 (function iterate() {
47 iterator(arr[completed], function (err) {
48 if (err || err === false) {
49 callback(err);
50 callback = function () {};
51 }
52 else {
53 completed += 1;
54 if (completed === arr.length) {
55 callback();
56 }
57 else {
58 iterate();
59 }
60 }
61 });
62 })();
63}
64
65//
66// Helper function for expanding "named" matches

Callers 1

router.jsFile · 0.85

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…