debounceif
DebounceIf a condition is met.
Sample Usage
TypeScript
debounce, 1000 setTimeoutisLoading = false, 5000 // Example using functiondebounceIf, 500,, // Example with class instantiation debounceInst.debounce
HTML
See tests/debounceIf.html to learn more about how to incorporate this into your project via HTML and JS or tests/usage.ts for an example on how to debounceIf with NodeJS and Typescript.
Available Scripts
In the project directory, you can run:
npm run build
Builds debounceIf.ts and tests/usage.ts into JS files for usage. usage.ts is a demo of the script being used in Typescript while tests/debounceIf.html provides a demonstration of usage within the browser.
npm run test-usage
Runs the sample usage.js file which should output a log in your console.
Learn More
You can learn more about the developer here.