@spongex/async-for-each

1.0.2 • Public • Published

async-for-each

Async For Each

Async version of the forEach function.

Install to your existing project using:

npm i @spongex/async-for-each

Include ECMAScript:

import { asyncForEach } from '@spongex/async-for-each'

Include CommonJS:

const { asyncForEach } = require('@spongex/async-for-each')

Usage

asyncForEach: async (array: Array, callback: Function) => Promise

Example:

const collection:Array<number> = [ 1, 2, 3, 4, 5 ]

asyncForEach(collection, async (item) => {
  // do something asynchronous with item
})

Changelog

1.0.2

  • Dependencies bump

1.0.1

  • Comment error, quick fix

1.0.0

  • Initial release

Readme

Keywords

Package Sidebar

Install

npm i @spongex/async-for-each

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

4.16 kB

Total Files

8

Last publish

Collaborators

  • spongex