util-lib-throttle
Throttle method of encapsulation integration
Usage
const utils = require('util-lib-throttle');
// 绑定滚动事件
window.addEventListener('scroll', utils.throttle(function (e) {
console.log(11);
}, 2000))
Throttle method of encapsulation integration
const utils = require('util-lib-throttle');
// 绑定滚动事件
window.addEventListener('scroll', utils.throttle(function (e) {
console.log(11);
}, 2000))
npm i util-lib-throttle
1
1.0.0
ISC
3.04 kB
7