@jsdecorators/throttle
v1.0.7
Published
>Encapsulate `lodash.throttle` to a decorator. For further details please check [lodash/throttle.js](https://github.com/lodash/lodash/blob/master/throttle.js)
Downloads
5
Maintainers
Readme
@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
}
}