@alexsergey/async-loop

1.0.1 • Public • Published

Async Loop

Async loop and inverse async loop

import { asyncLoop, inverseAsyncLoop } from '@alexsergey/async-loop';

asyncLoop(items, (item, loop) => {
    //.. async logic
    loop.iteration() // return index of array iteration
    loop.next() // next iteration
    loop.break() // cancel loop
}, () => {
    // it calls after all iterations
})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i @alexsergey/async-loop

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

12.2 kB

Total Files

10

Last publish

Collaborators

  • alexsergey