@zcorky/debounce
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    109
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    109
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @zcorky/debounce

Weekly Downloads

109

Version

1.0.2

License

MIT

Unpacked Size

4.8 kB

Total Files

5

Last publish

Collaborators

  • uniquecolesmith