debounce
A helper function that creates a debounced function that delays invoking func until after wait milliseconds have elapsed since the last time the debounced function was invoked.
Import
import { debounce } from '@krakentech/utils';Usage
const fn = () => console.log('debounced');
const debouncedFn = debounce(fn, 1000);Args
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| function | The function to debounce. | Function | true | |
| waitingTimeInMs | The number of milliseconds to delay. | number | 150 | true |
Last updated on