async-loop

1.0.0 • Public • Published

AsyncLoop: simple async loop function

AsyncLoop exports a single function with the following signature: (array, end, forEach):

  • array is the array to loop over
  • end is a callback invoked when all the elements have been looped over. The first argument is an error, or undefined.
  • forEach receives three arguments: (elem, next, index). It is invoked for each element of array. next is a function that, when invoked, passes control to the next element in th array. Unless it's invoked with an argument, which is assumed to be an error. In this case, the async loop ends immediately.

Readme

Keywords

none

Package Sidebar

Install

npm i async-loop

Weekly Downloads

20

Version

1.0.0

License

none

Last publish

Collaborators

  • vincentcr