Debounce multiple function executions
npm i @three11/debounceor
yarn add @three11/debounceFirst, import the module:
import debounce from '@three11/debounce';Then use it to postpone a function's execution:
debounce(yourAwesomeFn());debounce(fn, wait, immediate) accepts three arguments:
fn: the function to debouncewait: miliseconds to wait before running thefnagainimmediate: whether the function should run immediately
GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007