debounce-my-function
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

debounce-my-function

Description

Debounce My Function is a helper to transform any function passed in "debounced". Which means, the function passed will execute after X ms.

Installation

yarn add debounce-my-function

or

npm install debounce-my-function --save

Usage

import { debounceMyFunction } from "debounce-my-function";

const debouncedFunction = debounceMyFunction(yourFunction, 1000);

debouncedFunction();

// Your function will execute with a delay of 1000 ms.

Parameters

  • First Parameter (required): Your function to be debounced
  • Second Parameter (optional): time in ms for the delay

Thank you and be free to contribute.

Package Sidebar

Install

npm i debounce-my-function

Weekly Downloads

2

Version

1.0.6

License

MIT

Unpacked Size

3.84 kB

Total Files

5

Last publish

Collaborators

  • leoreisdias