Number of milliseconds to wait between function calls. If the cooldown
should never expire, use Number.POSITIVE_INFINITY
.
100
Specify which side of the cooldown period the underlying function is allowed to be executed.
"leading"
- the underlying function is called immediately when the
throttled function is invoked with no cooldown in effect.
"trailing"
- the underlying function is queued to be called as soon as
the cooldown is complete.
"both"
- the underlying function is called immediately when the
throttled function is invoked with no cooldown in effect.
If the throttled function is invoked during the cooldown,
queues the underlying function to be called when the
cooldown is over.
"both"
The behavior for when the function is called during the cooldown period.
"throttle"
- Ignore the call and do not reset the cooldown period.
This is used to implement typical "throttle" behavior.
"debounce"
- Reset the cooldown period.
"throttle"
Generated using TypeDoc
These settings control the behavior of the throttle function.