asyncInterval
Async aware setInterval. Run functions at an interval without overlapping previous calls.
There is also a timeout option to continue the interval incase an async task is stuck.
Installation
$ npm install asyncinterval
Usage
code example:
var asyncInterval = ; var interval = ; // optional timeoutinterval;
parameters
function
: the function to call when interval does work, this function will be givendone
argument.interval
: in milliseconds, the internal frequencytimeout
: in milliseconds, if specified, will stop waitingdone
to be called and start next interval