sb-promise-queue
Promise queue with a nice API
Last updated 2 years ago by steelbrain .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install sb-promise-queue 
SYNC missed versions from official npm registry.

Promise-Queue

Promise queue with a nice API.

Installation

npm install --save sb-promise-queue

API

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.

Current Tags

  • 2.1.1                                ...           latest (2 years ago)

5 Versions

  • 2.1.1                                ...           2 years ago
  • 2.1.0                                ...           6 years ago
  • 2.0.0                                ...           7 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Total 12
Today 0
This Week 0
This Month 12
Last Day 0
Last Week 6
Last Month 0
Dependencies (0)
None
Dev Dependencies (4)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE