MCPcopy
hub / github.com/cujojs/when / map

Function map

benchmark/map.js:24–37  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

22 //
23
24 function map(n) {
25 return function(deferred) {
26
27 var input = [];
28 for(var i = 0; i < n; i++) {
29 input.push(when(i));
30 }
31
32 when.map(input, addOne).then(function() {
33 deferred.resolve();
34 });
35
36 };
37 }
38
39 //
40 // Promise helpers

Callers 1

map.jsFile · 0.70

Calls 1

whenFunction · 0.85

Tested by

no test coverage detected