@stembord/debounce
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

ts-debounce

debounce

import { debounce } from "@stembord/debounce";

let count = 0;

const func = debounce(
  () => {
    console.log(count); // 1
  },
  100,
  {
    after() {
      count -= 1;
      console.log(count); // 0
    },
    before() {
      count += 1;
    }
  }
);

func();
console.log(count); // 1

Readme

Keywords

Package Sidebar

Install

npm i @stembord/debounce

Weekly Downloads

0

Version

0.1.5

License

(MIT OR Apache-2.0)

Unpacked Size

18.3 kB

Total Files

13

Last publish

Collaborators

  • jwaterfaucett
  • nathanfaucett