Promise based Queue, written in ES6, works on Node v6+
import Queue from 'promise-queue-es6'
-
new Queue(Number maxConcurrent, Number maxQueued): Queue
max numbers are default to Infinity, means unlimited -
Queue#add(Function generator): Promise
- adds function argument that generates a promise to the queue` -
Queue#pendingLength
- read only property to get number of current pending promises -
Queue#queueLength
- read only property to get number of current queued promises