MCPcopy
hub / github.com/tdewolff/minify / asyncParallelArray

Function asyncParallelArray

_benchmarks/sample_antd.js:74781–74798  ·  view source on GitHub ↗
(arr, func, callback)

Source from the content-addressed store, hash-verified

74779}
74780
74781function asyncParallelArray(arr, func, callback) {
74782 var results = [];
74783 var total = 0;
74784 var arrLength = arr.length;
74785
74786 function count(errors) {
74787 results.push.apply(results, errors);
74788 total++;
74789
74790 if (total === arrLength) {
74791 callback(results);
74792 }
74793 }
74794
74795 arr.forEach(function (a) {
74796 func(a, count);
74797 });
74798}
74799
74800function asyncSerialArray(arr, func, callback) {
74801 var index = 0;

Callers 1

asyncMapFunction · 0.85

Calls 1

funcFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…