queueable-js

Simple queuing functionality with event emitter async call.
Forked and Inspired from async-function-queue
Installation
$ yarn add queueable-js
or,
$ npm install queueable-js
Usage
import Queue from "queueable-js"
const concurrency = 2
const queue = Queue(concurrency)
queue.push(function(cb) {
setTimeout(cb, 1000)
});
Events
queue.event().on('entry', function() {
console.log('starting to execute function')
})
queue.event().on('exit', function() {
console.log('finished executing function')
})
queue.event().on('drain', function() {
console.log('queue has drained')
})