Debouncer class
import Debouncer from '@cfware/debouncer';
const debouncer = new Debouncer(() => {
	console.log('debounced callback');
});
// Only run the callback once.
debouncer.run();
setTimeout(() => debouncer.run(), 50);callbackis the callback which is to be rate controlled. Required, must be a function.delayis the number of milliseconds to wait before running the callback. Optional, default100.maxDelaysmaximum number of full delays beforecallbackis run. Optional, default2.
This schedules a call to the callback.
If immediately is enabled the callback is run immediately.
This forces the callback to run immediately.
Cancel any scheduled runs of the callback.