Creates and returns a new debounced version of the passed function that will postpone its execution
until after wait milliseconds have elapsed since the last time it was invoked.
The returned function exposes .cancel() to discard a pending trailing call.
Creates and returns a new debounced version of the passed function that will postpone its execution until after wait milliseconds have elapsed since the last time it was invoked.
The returned function exposes
.cancel()to discard a pending trailing call.