README
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
<script type="module">
import utilLibThrottle from 'https://cdn.skypack.dev/util-lib-throttle';
</script>
Throttle method of encapsulation integration
const utils = require('util-lib-throttle');
// 绑定滚动事件
window.addEventListener('scroll', utils.throttle(function (e) {
console.log(11);
}, 2000))