Package Exports
- nexbounce
Readme
nexbounce
A debouncer library based on microtasks.
Demo
You can try the demo here.
Installation
npm i nexbounceDocumentation
You can find documentation here.
Example
import { Nexbounce } from 'nexbounce';
let counter = 0;
const nexbounce = new Nexbounce();
nexbounce.enqueue(() => (counter += 3));
nexbounce.enqueue(() => (counter += 1));
nexbounce.enqueue(() => (counter += 2));
setTimeout(() => console.log(counter)); // 2