Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@zcorky/debounce

zcorky698MIT1.0.2TypeScript support: included

Debounce functions

readme

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