MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / iterate

Function iterate

public/javascripts/async.js:257–280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

255 var nextKey = _keyIterator(obj);
256 var key = nextKey();
257 function iterate() {
258 var sync = true;
259 if (key === null) {
260 return callback(null);
261 }
262 iterator(obj[key], key, only_once(function (err) {
263 if (err) {
264 callback(err);
265 }
266 else {
267 key = nextKey();
268 if (key === null) {
269 return callback(null);
270 } else {
271 if (sync) {
272 async.setImmediate(iterate);
273 } else {
274 iterate();
275 }
276 }
277 }
278 }));
279 sync = false;
280 }
281 iterate();
282 };
283

Callers 1

async.jsFile · 0.85

Calls 3

callbackFunction · 0.85
only_onceFunction · 0.85
iteratorFunction · 0.70

Tested by

no test coverage detected