# sync-each

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

Latest version **1.0.1** (published 2017-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install sync-each
pnpm add sync-each
yarn add sync-each
bun add sync-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.1 |
| Published | 2017-01-10 |
| First published | 2017-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Paul Miller |
| Maintainers | whipstercz |
| Keywords | sync, forEach, each, map, synchronous, iteration, iterate, loop, concurrent, array, flow, control flow |

## Links

- npm: https://www.npmjs.com/package/sync-each
- Repository: https://github.com/whipstercz/sync-each
- Homepage: https://github.com/whipstercz/async-each/
- Issues: https://github.com/whipstercz/sync-each/issues
- npm.io page: https://npm.io/package/sync-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.1 (latest) — 2017-01-10

## README

# sync-each

No-bullshit, ultra-simple, 35-lines-of-code synchronized forEach function for JavaScript.

For browsers and node.js.

## Installation
* Just include sync-each before your scripts.
* `npm install sync-each` if you’re using node.js.
* `bower install sync-each` if you’re using [Bower](http://bower.io).

## Usage

* `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('sync-each');
each(items, 
	function (items,next) {
			//perform async operation with item
			next(err,transformed)
	},
	function (err,transformedItems) {
			//Success callback
	}
)


// Alternatively in browser:
syncEach(list, fn, callback);
```

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