Creates a debounced version of the provided function that delays execution until after the specified wait time has elapsed since the last invocation.
The function to debounce
Delay in milliseconds (default: 0)
A debounced function with a cancel method
Creates a debounced version of the provided function that delays execution until after the specified wait time has elapsed since the last invocation.