npm.io
1.0.2 • Published 8 years ago

@zcorky/debounce

Licence
MIT
Version
1.0.2
Deps
0
Size
5 kB
Vulns
0
Weekly
0

debounce

NPM version Coverage Status Dependencies Build Status license issues

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);
Relatived