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

0.1.23 • Public • Published

ts-debounce

license docs npm (scoped) build

debounce

import { debounce } from "@aicacia/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 @aicacia/debounce

Weekly Downloads

65

Version

0.1.23

License

(MIT OR Apache-2.0)

Unpacked Size

27.1 kB

Total Files

19

Last publish

Collaborators

  • nathanfaucett