# parallel-promises

> Promise.all() with concurrency limit

Latest version **1.6.17** (published 2026-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install parallel-promises
pnpm add parallel-promises
yarn add parallel-promises
bun add parallel-promises
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.6.17 |
| Published | 2026-03-22 |
| First published | 2019-12-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 30.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Rafael Pernil Bronchalo |
| Maintainers | rafaelpernil |
| Keywords | Promise, all, concurrent, parallel |

## Links

- npm: https://www.npmjs.com/package/parallel-promises
- Repository: https://github.com/rafaelpernil2/ParallelPromises
- Homepage: https://github.com/rafaelpernil2/ParallelPromises#readme
- Issues: https://github.com/rafaelpernil2/ParallelPromises/issues
- npm.io page: https://npm.io/package/parallel-promises

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@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

## Recent versions

- 1.6.17 (latest) — 2026-03-22
- 1.6.16 — 2024-06-17
- 1.6.15 — 2023-11-13
- 1.6.14 — 2023-07-21
- 1.6.13 — 2023-01-06
- 1.6.12 — 2022-11-22
- 1.6.11 — 2022-03-29
- 1.6.10 — 2022-03-25
- 1.6.9 — 2022-02-12
- 1.6.8 — 2022-02-12
- 1.6.7 — 2022-02-12
- 1.6.6 — 2021-08-11
- 1.6.5 — 2021-06-11
- 1.6.4 — 2021-05-11
- 1.6.3 — 2021-04-01
- … 22 more at https://npm.io/package/parallel-promises/versions

## README

# ParallelPromises

[![Actions Status](https://github.com/rafaelpernil2/ParallelPromises/workflows/ci/badge.svg)](https://github.com/rafaelpernil2/ParallelPromises/actions)
[![Coverage Status](https://coveralls.io/repos/github/rafaelpernil2/ParallelPromises/badge.svg?branch=master)](https://coveralls.io/github/rafaelpernil2/ParallelPromises?branch=master)
[![npm version](https://badge.fury.io/js/parallel-promises.svg)](https://badge.fury.io/js/parallel-promises)
[![](https://badgen.net/badge/icon/TypeScript?icon=typescript&label)]()
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

ParallelPromises is an NPM package implemented in Typescript for executing a set of Promises with a given concurrency limit.

This project is inspired by https://itnext.io/node-js-handling-asynchronous-operations-in-parallel-69679dfae3fc

## Table of Contents
- [ParallelPromises](#parallelpromises)
  - [Table of Contents](#table-of-contents)
  - [Installation](#installation)
  - [Usage](#usage)
  - [Contributing](#contributing)
  - [Credits](#credits)
  - [License](#license)

## Installation

Install it on your project
```Shell
npm install --save parallel-promises
```

## Usage
**Usage with Typescript**

```typescript
import { customPromiseAll } from 'parallel-promises';

...

const concurrentLimit: number = 5;

const listOfPromises: ICustomPromise[] = [
      {
        name: 'GetSomething',
        function: this.operationWrapper.getSomethingFunction,
        thisArg: this.operationWrapper,
        args: ["firstParamForFunction",{ data: "Another param"}, ["more params..."]]
      },
      {
        name: 'CreateSomething',
        function: this.createSomething,
        thisArg: undefined,
        args: ["firstParamForFunction"]
      },
      {
        name: 'RefreshSomething',
        function: this.updateSomething,
      },
      ...
      ]

      customPromiseAll(listOfPromises, concurrentLimit).then((result: IAnyObject)=>{
          console.log(result);
          //{ GetSomething: { Response: ... }, CreateSomething: "{ Id: 8 }", RefreshSomething: "OK" , ...}
          ...
          // do whatever you want
      });
```

**Usage with Javascript**
```javascript
const ParallelPromises = require('parallel-promises');

...

const concurrentLimit = 5;

const listOfPromises = [
      {
        name: 'GetSomething',
        function: this.operationWrapper.getSomethingFunction,
        thisArg: this.operationWrapper,
        args: ["firstParamForFunction",{ data: "Another param"}, ["more params..."]]
      },
      {
        name: 'CreateSomething',
        function: this.createSomething,
        thisArg: undefined,
        args: ["firstParamForFunction"]
      },
      {
        name: 'RefreshSomething',
        function: this.updateSomething,
      },
      ...
      ]

      ParallelPromises.customPromiseAll(listOfPromises, concurrentLimit).then((result)=>{
          console.log(result);
          //{ GetSomething: { Response: ... }, CreateSomething: "{ Id: 8 }", RefreshSomething: "OK" , ...}
          ...
          // do whatever you want
      });
```

## Contributing
There is no plan regarding contributions in this project
## Credits
This NPM package has been developed by:

**Rafael Pernil Bronchalo** - *Developer*

* [github/rafaelpernil2](https://github.com/rafaelpernil2)

## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

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