(eachfn, arr, iterator, callback)
| 718 | async.selectSeries = async.filterSeries; |
| 719 | |
| 720 | var _reject = function (eachfn, arr, iterator, callback) { |
| 721 | var results = []; |
| 722 | arr = _map(arr, function (x, i) { |
| 723 | return {index: i, value: x}; |
| 724 | }); |
| 725 | eachfn(arr, function (x, callback) { |
| 726 | iterator(x.value, function (v) { |
| 727 | if (!v) { |
| 728 | results.push(x); |
| 729 | } |
| 730 | callback(); |
| 731 | }); |
| 732 | }, function (err) { |
| 733 | callback(_map(results.sort(function (a, b) { |
| 734 | return a.index - b.index; |
| 735 | }), function (x) { |
| 736 | return x.value; |
| 737 | })); |
| 738 | }); |
| 739 | }; |
| 740 | async.reject = doParallel(_reject); |
| 741 | async.rejectSeries = doSeries(_reject); |
| 742 |
nothing calls this directly
no test coverage detected
searching dependent graphs…