Loading problem…
Implement debounce - a utility that delays function execution until calls stop for a fixed time window.
fn and a delay delay in milliseconds.debounced(...args).debounced resets the timer.fn.fn after delay milliseconds using the latest arguments.fn runs, preserve the caller's this value.delay of 0 must still schedule asynchronously (next macrotask).