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

Function _asyncMap

examples/browser/nodeunit.js:650–663  ·  view source on GitHub ↗
(eachfn, arr, iterator, callback)

Source from the content-addressed store, hash-verified

648
649
650 var _asyncMap = function (eachfn, arr, iterator, callback) {
651 var results = [];
652 arr = _map(arr, function (x, i) {
653 return {index: i, value: x};
654 });
655 eachfn(arr, function (x, callback) {
656 iterator(x.value, function (err, v) {
657 results[x.index] = v;
658 callback(err);
659 });
660 }, function (err) {
661 callback(err, results);
662 });
663 };
664 async.map = doParallel(_asyncMap);
665 async.mapSeries = doSeries(_asyncMap);
666

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…