MCPcopy Index your code
hub / github.com/caolan/nodeunit / _asyncMap

Function _asyncMap

deps/async.js:157–170  ·  view source on GitHub ↗
(eachfn, arr, iterator, callback)

Source from the content-addressed store, hash-verified

155
156
157 var _asyncMap = function (eachfn, arr, iterator, callback) {
158 var results = [];
159 arr = _map(arr, function (x, i) {
160 return {index: i, value: x};
161 });
162 eachfn(arr, function (x, callback) {
163 iterator(x.value, function (err, v) {
164 results[x.index] = v;
165 callback(err);
166 });
167 }, function (err) {
168 callback(err, results);
169 });
170 };
171 async.map = doParallel(_asyncMap);
172 async.mapSeries = doSeries(_asyncMap);
173

Callers

nothing calls this directly

Calls 1

_mapFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…