Throttle
Throttles a function so it can't be called more often than a given delay.
Throttles a function so it can't be called more often than a given delay.
throttle(fn, delay)
Creates a new version of the function fn
, which will not execute more often than once every delay
milliseconds regardless of how many times it is called.
A function to be throttled.
The number of milliseconds for which the function should be unable to be called after each time it is executed..
This button can only be activated every 200 ms:
This button can only be activated once every second: