min-delay
Wait a minimum quantity of time between consecutive callbacks.
Install
$ npm install min-delay --save
Usage
const minDelay = const get = const delay = const fn = getconcat { // If the request take more than 1000ms, then the callback is returned // otherwise we wait the time until 1000ms // For example, if the request take 100ms, we wait 900ms until // return the callback. if err throw err console}
API
minDelay(delay)
input
Required
Type: Number
Quantity of time to wait before return the callback.
License
MIT © Kiko Beats.