1.0.6 • Published 2 years ago

debounce-my-function v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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.