1.0.1 • Published 4 years ago
@gyakusetsu/simple-debounce v1.0.1
debounce
Used for implementing behavior that should only happen after a repeated action from user with a delay.
Installation
$ npm i @gyakusetsu/simple-debounce
Example
var debounce = require('simple-debounce');
// Delays search query call/command for 250 ms after only user finished typing.
function debouncedSearch = debounce((query) => {
getItemsByName(query);
}, 250)
function handleSearchBoxChange(query) {
debouncedSearch();
}
License
MIT