async
async copied to clipboard
applyEach does not work as described in the docs
Hi,
I ran this issue when trying to use applyEach. Seems it does not behave as described in the docs.
What version of async are you using? 3.0.1
Which environment did the issue occur in (Node version/browser version) Node.js 10.15.3
What did you do? Please include a minimal reproducable case illustrating issue.
async.applyEach(
[
(a, b, done) => {
done(null, a + b)
},
(a, b, done) => {
done(null, a - b);
}
],
1, 1,
(err, ret) => {
console.log(err, ret)
}
);
What did you expect to happen? Each function get executed. final callback called only one time after all functions executed.
What was the actual result?
applyEach returns [function: awaitable], when invoked, the last argument callback was called for each function
Ah, I forgot to update the example. Thanks for pointing this out.