JSPM

  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q32555F
  • License MIT

A debouncer library based on microtasks.

Package Exports

  • nexbounce

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nexbounce) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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 { 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