utils.function.throttle
throttle(fn: Function, delay: number, no_trailing: no_trailing) → {Function}
returns a function that, when invoked will only be triggered at most once during a given window of time
Name | Type | Description |
---|---|---|
fn | Function |
the function to be throttled. |
delay | number |
The delay in ms |
no_trailing | no_trailing |
disable the execution on the trailing edge |
Type | Description |
---|---|
Function |
the function that will be throttled |