1.0.2 • Published 6 years ago
@zcorky/debounce v1.0.2
debounce
Do action after a repeated action has completed.
Install
$ npm install @zcorky/debounce
Usage
// import
import debounce from '@zcorky/debounce';
// debounce
function resize(e) {
console.log('width', window.innerWidth);
console.log('height', window.innerHeight);
}
window.onresize = debounce(resize, 200);