# sb-promise-queue

> Promise queue with a nice API

Latest version **2.1.1** (published 2025-01-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install sb-promise-queue
pnpm add sb-promise-queue
yarn add sb-promise-queue
bun add sb-promise-queue
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

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

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2025-01-06 |
| First published | 2018-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 8 |
| Dependencies | 0 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | steelbrain |
| Maintainers | steelbrain |
| Keywords | Promise, queue |

## Links

- npm: https://www.npmjs.com/package/sb-promise-queue
- Repository: https://github.com/steelbrain/promise-queue
- Homepage: https://github.com/steelbrain/promise-queue#readme
- Issues: https://github.com/steelbrain/promise-queue/issues
- npm.io page: https://npm.io/package/sb-promise-queue

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 2.1.1 (latest) — 2025-01-06
- 2.1.0 — 2020-08-03
- 2.0.0 — 2020-05-03
- 1.0.1 — 2018-06-03
- 1.0.0 — 2018-06-03

## README

# Promise-Queue

Promise queue with a nice API.

### Installation

```
npm install --save sb-promise-queue
```

## API

```js
interface Options {
  concurrency?: number
}

class PromiseQueue {
  constructor(options: Options = {concurrency: 1});

  clear()
  onIdle(callback: Function): Function
  // call the return value function to remove listener
  waitTillIdle(): Promise<void>
  add(callback: Function)
}

export { PromiseQueue }
```

## License

The contents of this repository/package are licensed under the terms of The MIT License. See the LICENSE file for more info.

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