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

1.0.0 • Public • Published

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

Dependencies (0)

    Dev Dependencies (15)

    Package Sidebar

    Install

    npm i @zcorky/throttle

    Weekly Downloads

    109

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    4.27 kB

    Total Files

    5

    Last publish

    Collaborators

    • uniquecolesmith