# promise-serial-exec

> Execute promises sequentially, aka sequential `Promise.all`.

Latest version **1.0.0** (published 2018-04-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install promise-serial-exec
pnpm add promise-serial-exec
yarn add promise-serial-exec
bun add promise-serial-exec
```

## 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.0 |
| Published | 2018-04-05 |
| First published | 2018-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Julien Bouquillon |
| Maintainers | revolunet |
| Keywords | promise, sync, async, serial |

## Links

- npm: https://www.npmjs.com/package/promise-serial-exec
- Repository: https://github.com/revolunet/promise-serial-exec
- Homepage: https://revolunet.github.io/promise-serial-exec/
- Issues: https://github.com/revolunet/promise-serial-exec/issues
- npm.io page: https://npm.io/package/promise-serial-exec

## 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.0 (latest) — 2018-04-05

## README

# promise-serial-exec

[![npm](https://img.shields.io/npm/v/promise-serial-exec.svg)](https://www.npmjs.com/package/promise-serial-exec) ![license](https://img.shields.io/npm/l/promise-serial-exec.svg) [![github-issues](https://img.shields.io/github/issues/revolunet/promise-serial-exec.svg)](https://github.com/revolunet/promise-serial-exec/issues) [![Circle CI build status](https://circleci.com/gh/revolunet/promise-serial-exec.svg?style=svg)](https://circleci.com/gh/revolunet/promise-serial-exec)

![nodei.co](https://nodei.co/npm/promise-serial-exec.png?downloads=true&downloadRank=true&stars=true)

Execute promises sequentially, aka sequential `Promise.all`.

Can be useful for CPU-intensive operations, databases, scrapping...

## Usage

```js

const serialExec = require('promise-serial-exec')

const urls = [
  url1,
  url2,
  url3
];

// make the promise callables so they're executed on-demand
const promiseCalls = urls.map((url, i) => () => fetch(url))

// urls will be fetched in order
serialExec(promiseCalls).then(console.log)


// will add a 0-500ms delay between each call
serialExec(promiseCalls, {
  randomTimeout: 500
}).then(console.log)
```

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