# @awesomeorganization/promise-queue

> [ESM] The promise-based queue with concurrency control. Works with Browser and Node.js

Latest version **1.2.1** (published 2022-03-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @awesomeorganization/promise-queue
pnpm add @awesomeorganization/promise-queue
yarn add @awesomeorganization/promise-queue
bun add @awesomeorganization/promise-queue
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2022-03-15 |
| First published | 2021-04-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12.9.0 |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | sergeysedoy97 |
| Maintainers | sergey.sedoy.97 |
| Keywords | concurrency, promise-based, promise-queue, promise, queue |

## Links

- npm: https://www.npmjs.com/package/@awesomeorganization/promise-queue
- Repository: https://github.com/awesomeorganization/promise-queue
- Homepage: https://github.com/awesomeorganization/promise-queue#readme
- Issues: https://github.com/awesomeorganization/promise-queue/issues
- npm.io page: https://npm.io/package/@awesomeorganization/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

- 1.2.1 (latest) — 2022-03-15
- 1.2.0 — 2022-01-26
- 1.1.0 — 2021-09-24
- 1.0.0 — 2021-04-27

## README

# promise-queue

:boom: [ESM] The promise-based queue with concurrency control. Works with Browser and Node.js

---

![GitHub Workflow](https://img.shields.io/github/workflow/status/awesomeorganization/promise-queue/npm-publish?style=flat-square)
![Codacy](https://img.shields.io/codacy/grade/517682e4f17148c6a5efcbc3d56583b2?style=flat-square)
![CodeFactor](https://img.shields.io/codefactor/grade/github/awesomeorganization/promise-queue?style=flat-square)
![Snyk](https://img.shields.io/snyk/vulnerabilities/npm/@awesomeorganization/promise-queue?style=flat-square)
![Depfu](https://img.shields.io/depfu/awesomeorganization/promise-queue?style=flat-square)
![npms.io](https://img.shields.io/npms-io/final-score/@awesomeorganization/promise-queue?style=flat-square)

---

## Install

```sh
npm install @awesomeorganization/promise-queue
```

## Example

Full example in `/example` folder.

```js
const { push } = promiseQueue({
  concurrency: 2,
})
const [
  {
    headers: { date: dateA },
  },
  {
    headers: { date: dateB },
  },
  {
    headers: { date: dateC },
  },
] = await Promise.all([
  push(() => {
    return request('https://httpbin.org/delay/1')
  }),
  push(() => {
    return request('https://httpbin.org/delay/1')
  }),
  push(() => {
    return request('https://httpbin.org/delay/1')
  }),
])
console.dir({
  dateA,
  dateB,
  dateC,
})
// {
//   dateA: 'Wed, 26 Jan 2022 20:00:01 GMT',
//   dateB: 'Wed, 26 Jan 2022 20:00:02 GMT',
//   dateC: 'Wed, 26 Jan 2022 20:00:02 GMT',
// }
```

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