Debounce ๐
@common-utilities/debounce ๐งฐ
Debounce is a common function that waits a set amount of time before invoking a callback.
Install
yarn add @common-utilities/debounce -D
Usage
let result = 1
const add1 = (val) => {
result = val + 1
}
debounce(add1, 1000)(1) // returns 2, after 1 second
Common Utilities ๐งฐ
No cruft. No bloat. No dependencies.
Simple, typed, functional, documented, and tested javascript utility functions.
View other common utilities on Github.
Last updated
Was this helpful?