(eachfn, arr, iterator, callback)
| 225 | async.selectSeries = async.filterSeries; |
| 226 | |
| 227 | var _reject = function (eachfn, arr, iterator, callback) { |
| 228 | var results = []; |
| 229 | arr = _map(arr, function (x, i) { |
| 230 | return {index: i, value: x}; |
| 231 | }); |
| 232 | eachfn(arr, function (x, callback) { |
| 233 | iterator(x.value, function (v) { |
| 234 | if (!v) { |
| 235 | results.push(x); |
| 236 | } |
| 237 | callback(); |
| 238 | }); |
| 239 | }, function (err) { |
| 240 | callback(_map(results.sort(function (a, b) { |
| 241 | return a.index - b.index; |
| 242 | }), function (x) { |
| 243 | return x.value; |
| 244 | })); |
| 245 | }); |
| 246 | }; |
| 247 | async.reject = doParallel(_reject); |
| 248 | async.rejectSeries = doSeries(_reject); |
| 249 |
nothing calls this directly
no test coverage detected
searching dependent graphs…