Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

applyEach does not work as described in the docs #1658

Closed
sebastien-ma opened this issue Jun 5, 2019 · 1 comment
Closed

applyEach does not work as described in the docs #1658

sebastien-ma opened this issue Jun 5, 2019 · 1 comment

Comments

@sebastien-ma
Copy link

sebastien-ma commented Jun 5, 2019

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

@aearly
Copy link
Collaborator

aearly commented Jun 5, 2019

Ah, I forgot to update the example. Thanks for pointing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants