promisqueue

1.0.3 • Public • Published

PromisQueue NPM Version Build Status

Simple ES6 Promises based queue, with optional (and flexible) concurrency.

Installation

promisqueue can be installed using npm:

npm install promisqueue

Interface

  • new PromisQueue(Object options): PromisQueue

Methods:

  • PromisQueue#add(Function factory): Number - adds function argument that generates a promise to the queue (FIFO)
  • PromisQueue#prepend(Function factory): Number - adds function argument that generates a promise to the queue (LIFO)

Properties:

  • PromisQueue#length: Number - returns current length of buffer(added but not started promise generators)
  • PromisQueue#currentConcurrency: Number - returns number of current concurrency limit

Readme

Keywords

Package Sidebar

Install

npm i promisqueue

Weekly Downloads

7

Version

1.0.3

License

MIT

Last publish

Collaborators

  • dariom