Skip to content

applyEach does not work as described in the docs #1658

@sebastien-ma

Description

@sebastien-ma

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions