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

Package detail

@zcorky/throttle

zcorky453MIT1.0.0TypeScript support: included

Throttle a function

readme

throttle

NPM version Coverage Status Dependencies Build Status license issues

Throttle a function.

Install

$ npm install @zcorky/throttle

Usage

// import
import throttle from '@zcorky/throttle';

// throttle
function resize(e) {
  console.log('width', window.innerWidth);
  console.log('height', window.innerHeight);
}

window.onresize = throttle(resize, 200);

Relatived