Skip to content


Repository files navigation

🤏 Promise Throttle All

Promise.all with limited concurrency

CI license Library minified size git3moji typescript buy-me-a-coffee

Limit in-progress async operations, like running only few API requests at a time

Quick use

import { throttleAll } from 'promise-throttle-all'

// task1 takes 100ms to complete
const task1 = () =>
  new Promise((resolve) => {
    setTimeout(resolve, 100, 1)

const task2 = () => Promise.resolve(2)

// Limit concurently running promises to 1
throttleAll(1, [task1, task2]).then((values) => {
// task2 will run after task1 finishes
// logs: `[1, 2]`


This library is published in the NPM registry and can be installed using any compatible package manager.

npm install promise-throttle-all --save

# For Yarn, use the command below.
yarn add promise-throttle-all

Installation from CDN

This module has an UMD bundle available through JSDelivr and Unpkg CDNs.

<!-- For UNPKG use the code below. -->
<script src=""></script>

<!-- For JSDelivr use the code below. -->
<script src=""></script>

  // UMD module is exposed through the "promiseThrottleAll" global variable.


Documentation generated from source files by Typedoc.


Released under MIT License.