sb-promise-queue
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i sb-promise-queue

Weekly Downloads

89,252

Version

2.1.0

License

MIT

Unpacked Size

8.9 kB

Total Files

7

Last publish

Collaborators

  • steelbrain