MCPcopy
hub / github.com/caolan/async / iteratee

Function iteratee

mocha_test/concat.js:8–18  ·  view source on GitHub ↗
(x, cb)

Source from the content-addressed store, hash-verified

6 it('concat', function(done) {
7 var call_order = [];
8 var iteratee = function (x, cb) {
9 setTimeout(function(){
10 call_order.push(x);
11 var r = [];
12 while (x > 0) {
13 r.push(x);
14 x--;
15 }
16 cb(null, r);
17 }, x*25);
18 };
19 async.concat([1,3,2], iteratee, function(err, results){
20 expect(results).to.eql([1,2,1,3,2,1]);
21 expect(call_order).to.eql([1,2,3]);

Callers 7

eachOfArrayLikeFunction · 0.85
replenishFunction · 0.85
_createTesterFunction · 0.85
filterArrayFunction · 0.85
filterGenericFunction · 0.85
_withoutIndexFunction · 0.85
rejectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…