nexbounce
v7.0.1
Published
A debouncer library based on microtasks.
Downloads
36
Maintainers
Readme
nexbounce
A debouncer library based on microtasks.
Demo
You can try the demo here.
Installation
npm i nexbounce
Documentation
You can find documentation here.
Example
import { Debouncer } from 'nexbounce/nexbounce.js';
let counter = 0;
const debouncer = new Debouncer();
nexbounce.enqueue(() => (counter += 3));
nexbounce.enqueue(() => (counter += 1));
nexbounce.enqueue(() => (counter += 2));
setTimeout(() => console.log(counter)); // 2