1.0.6 • Published 5 years ago

@jsxtools/debounce v1.0.6

Weekly downloads
1
License
CC0-1.0
Repository
github
Last release
5 years ago

debounce

debounce returns a function that throttles updates coming in rapid succession.

It is 176 bytes (142 gzipped).

Installation

npm install @jsxtools/debounce

Usage

import debounce from '@jsxtools/debounce';

window.addEventListener('resize', debounce(() => {
  // resize events
}, 250, true));