MCPcopy Create free account
hub / github.com/ReactJSResources/react-webpack-babel / map

Function map

public/bundle.js:5146–5160  ·  view source on GitHub ↗

* Async array map using after

(ary, each, done)

Source from the content-addressed store, hash-verified

5144 */
5145
5146 function map(ary, each, done) {
5147 var result = new Array(ary.length);
5148 var next = after(ary.length, done);
5149
5150 var eachWithIndex = function(i, el, cb) {
5151 each(el, function(error, msg) {
5152 result[i] = msg;
5153 cb(error, result);
5154 });
5155 };
5156
5157 for (var i = 0; i < ary.length; i++) {
5158 eachWithIndex(i, ary[i], next);
5159 }
5160 }
5161
5162 /*
5163 * Decodes data when a payload is maybe expected. Possible binary contents are

Callers 1

bundle.jsFile · 0.85

Calls 2

afterFunction · 0.85
eachWithIndexFunction · 0.85

Tested by

no test coverage detected