# queuery

> 迷你的并发 Promise 处理器

Latest version **1.0.4** (published 2020-03-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install queuery
pnpm add queuery
yarn add queuery
bun add queuery
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2020-03-27 |
| First published | 2020-03-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 43 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Erioifpud |
| Maintainers | erioifpud |
| Keywords | concurrency, concurrent, task, asynchronous, async |

## Links

- npm: https://www.npmjs.com/package/queuery
- Repository: https://github.com/erioifpud/queuery
- Homepage: https://github.com/erioifpud/queuery#readme
- Issues: https://github.com/erioifpud/queuery/issues
- npm.io page: https://npm.io/package/queuery

## Recent versions

- 1.0.4 (latest) — 2020-03-27
- 1.0.3 — 2020-03-17
- 1.0.2 — 2020-03-16
- 1.0.1 — 2020-03-16
- 1.0.0 — 2020-03-16

## README

# Queuery
[![Build Status](https://travis-ci.org/Erioifpud/queuery.svg?branch=master)](https://travis-ci.org/Erioifpud/queuery)
[![npm](https://img.shields.io/npm/v/queuery.svg?color=red)](http://npmjs.com/queuery)
[![license](https://img.shields.io/github/license/erioifpud/queuery.svg)]()

迷你的并发 Promise 处理器，可以**限制同时运行**的任务数量，默认有**错误重试**功能。

默认的并发数量是 3，错误重试次数也是 3

## 安装
```
yarn add queuery
```

## 例子
```javascript
// import Queuery from 'queuery'
const Queuery = require('queuery').default

const q = new Queuery({
  // 并发数量，默认为 3
  limit: 3,
  // 重试次数，默认为 3
  retries: 3,
  // 打印详细状态，默认为 false
  verbose: false
})
q.task((name) => Promise.resolve(name), 'resolve')
q.taskWithName('reject', () => Promise.reject('error'))
q.start((results) => {
  console.log(results)
})
```

## TODO
- 过滤不合法参数
- Promise polyfill
- 完善队列操作
- index.d.ts
- 补全单元测试
- 例子中写明所有的方法

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