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

Function eachWithIndex

public/javascripts/socket.io.js:5884–5889  ·  view source on GitHub ↗
(i, el, cb)

Source from the content-addressed store, hash-verified

5882 var next = after(ary.length, done);
5883
5884 var eachWithIndex = function(i, el, cb) {
5885 each(el, function(error, msg) {
5886 result[i] = msg;
5887 cb(error, result);
5888 });
5889 };
5890
5891 for (var i = 0; i < ary.length; i++) {
5892 eachWithIndex(i, ary[i], next);

Callers 1

mapFunction · 0.85

Calls 2

eachFunction · 0.85
cbFunction · 0.70

Tested by

no test coverage detected