ready-queue
Ready-queue ensures initialization method only run once, and queues listeners which are registered to it.
Install
$ npm install ready-queue --save
Usage
const queue = const q = q q q
queue({load, retry = 0})
- load
function(args)
if the function is asynchronous, it should return aPromise
.- args
any
arguments which is from.add(args)
method
- args
- retry
number=0
how many timesqueue
will retry if fails.
.add(args)
returns Promise
License
MIT