flush and cancel controls.
Signature
Parameters
Function to debounce.
Debounce delay in milliseconds, or an options object with
delay, leading, and flushOnUnmount.Returns
A debounced version of the callback with additional methods.