debounce
Creates a debounced function that delays invoking func until after delay milliseconds have elapsed since the last time the debounced function was invoked
Available since v1.9.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
func | function | The function to debounce |
delay | number | The number of milliseconds to delay |
Returns
Section titled “Returns”function — The debounced function
Examples
Section titled “Examples”Debounce a function
Section titled “Debounce a function”The debounced function is only called once after the delay, even if invoked multiple times.
