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

Parameters:
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

Returns:
Type Description
Function

the function that will be throttled

Powered by webdoc!