# promise-each-concurrency

> Process an iterable of promises with concurrency

Latest version **3.0.0** (published 2019-01-30) · 0 weekly downloads

## Install

```sh
npm install promise-each-concurrency
pnpm add promise-each-concurrency
yarn add promise-each-concurrency
bun add promise-each-concurrency
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2019-01-30 |
| First published | 2016-06-26 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 1 |
| Unpacked size | 172.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Michael Leaney |
| Maintainers | leahcimic |

## Links

- npm: https://www.npmjs.com/package/promise-each-concurrency
- Repository: https://github.com/leahciMic/promise-each-concurrency
- Homepage: https://github.com/leahciMic/promise-each-concurrency#readme
- Issues: https://github.com/leahciMic/promise-each-concurrency/issues
- npm.io page: https://npm.io/package/promise-each-concurrency

## Dependencies (1)

- [esm](https://npm.io/package/esm.md) ^3.2.0

## Recent versions

- 3.0.0 (latest) — 2019-01-30
- 2.0.1 — 2017-12-14
- 2.0.0 — 2017-12-13
- 1.1.1 — 2016-09-28
- 1.1.0 — 2016-07-26
- 1.0.4 — 2016-06-30
- 1.0.3 — 2016-06-30
- 1.0.2 — 2016-06-27
- 1.0.1 — 2016-06-27
- 1.0.0 — 2016-06-27
- 0.0.2 — 2016-06-27
- 0.0.1 — 2016-06-26

## README

# Promise each concurrency [![Build Status](https://travis-ci.org/leahciMic/promise-each-concurrency.svg?branch=master)](https://travis-ci.org/leahciMic/promise-each-concurrency)

> Process an iterable of promises with concurrency

## Table of Contents

- [Install](#install)
- [Usage](#usage)
- [API](#api)
- [Contribute](#contribute)
- [License](#license)

## Install

```sh
npm i promise-each-concurrency

# Or with Yarn
yarn add promise-each-concurrency
```

## Usage

```js
import promiseEach from `promise-each-concurrency`;

promiseEach(
  [1, 2, 3],
  function(x) {
    return new Promise(function(resolve) {
      setTimeout(resolve.bind(undefined, x), 1000);
    })
  },
  {
    concurrency: 1
  }
);
```

Will produce:
```
1
2
3
```

With a 1 second pause between each line.

## API

```js
promiseEach(
  Iterable<any> input,
  function(any item) iterator,
  options
) -> Promise
```

### Options

| Name        | Default       | Description                                            |
|-------------|---------------|--------------------------------------------------------|
| concurrency | Math.infinity | how many items to process at once, default is no limit |

## Contributing

See [the contribute file](CONTRIBUTING.md)!

PRs accepted.

## License

[MIT © Michael Leaney](LICENSE)

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