The type of the function to throttle.
The function to be throttled.
The minimum time interval (in milliseconds) between invocations of func
.
A new function that wraps func
and enforces the throttling behavior.
This utility is useful for rate-limiting a function that might be called frequently, such as an event handler or API call, to improve performance or avoid overloading a system.
Creates a throttled version of a function that ensures the original function is invoked at most once every specified number of milliseconds.