@jsdecorators/throttle
Encapsulate
lodash.throttle
to a decorator. For further details please check lodash/throttle.js
install
~$ yarn add @jsdecorators/throttle
or
~$ npm i @jsdecorators/throttle
usage
import throttle from '@jsdecorators/throttle';
class MyClass {
@throttle(100)
onScroll() {
// this function would be called every 100ms
}
}