# async-each

> No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach / map function for JavaScript.

Latest version **1.0.6** (published 2023-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install async-each
pnpm add async-each
yarn add async-each
bun add async-each
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2023-02-04 |
| First published | 2013-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Paul Miller |
| Maintainers | es128, paulmillr |
| Keywords | async, forEach, each, map, asynchronous, iteration, iterate, loop, parallel, concurrent, array, flow, control flow |

## Links

- npm: https://www.npmjs.com/package/async-each
- Repository: https://github.com/paulmillr/async-each
- Homepage: https://github.com/paulmillr/async-each/
- Issues: https://github.com/paulmillr/async-each/issues
- Funding: https://paulmillr.com/funding/
- npm.io page: https://npm.io/package/async-each

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.0.6 (latest) — 2023-02-04
- 1.0.5 — 2023-01-29
- 1.0.4 — 2023-01-28
- 1.0.3 — 2019-04-16
- 1.0.2 — 2019-03-14
- 1.0.1 — 2016-08-24
- 1.0.0 — 2015-11-26
- 0.1.6 — 2014-11-05
- 0.1.5 — 2014-10-23
- 0.1.4 — 2013-11-12
- 0.1.3 — 2013-07-24
- 0.1.2 — 2013-07-07
- 0.1.1 — 2013-06-14
- 0.1.0 — 2013-06-14

## README

# async-each

No-bullshit, ultra-simple, 40-lines-of-code async parallel forEach function for JavaScript.

We don't need junky 30K async libs. Really.

For browsers and node.js.

## Usage

`npm install async-each` if you're using NPM.

For browsers, just include async-each before your scripts and use global variable `asyncEach`

* `each(array, iterator, callback)` — `Array`, `Function`, `(optional) Function`
* `iterator(item, next)` receives current item and a callback that will mark the item as done. `next` callback receives optional `error, transformedItem` arguments.
* `callback(error, transformedArray)` optionally receives first error and transformed result `Array`.

```javascript
var each = require('async-each');
each(['a.js', 'b.js', 'c.js'], fs.readFile, function(error, contents) {
  if (error) console.error(error);
  console.log('Contents for a, b and c:', contents);
});

asyncEach(list, fn, callback); // use global var in browser
```

## License

The MIT License (MIT)

Copyright (c) 2016 Paul Miller [(paulmillr.com)](https://paulmillr.com)

See [LICENSE](https://github.com/paulmillr/async-each/blob/master/LICENSE) file.

---
_Source: https://npm.io/package/async-each · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
