nexbounce
TypeScript icon, indicating that this package has built-in type declarations

7.0.1 • Public • Published

nexbounce

A debouncer library based on microtasks.

npm version npm downloads github issues license

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

Package Sidebar

Install

npm i nexbounce

Weekly Downloads

4

Version

7.0.1

License

MIT

Unpacked Size

3.79 kB

Total Files

5

Last publish

Collaborators

  • hawmex