@micro-js/throttle-intervaled
v1.0.2
Published
A throttle that only fires on an interval.
Downloads
18
Readme
throttle-intervaled
A throttle that only fires on an interval.
Installation
$ npm install @micro-js/throttle-intervaledUsage
var throttle = require('@micro-js/throttle-intervaled')
var hello = throttle(500, function () {
console.log('Hello world')
})
// will log "hello world" once, 500 ms from first call
hello()
hello()
API
throttleIntervaled(interval, fn)
interval- intervalfn- function to throttle
Returns: throttled fn
License
MIT
