debounce()

Creates a debounced copy of the function which when called will delay the execution until the specified amount of milliseconds have elapsed since the last time it ran.

This function is valid in v2.0.0 to v2.12.0. This function has been downloaded 11 times.

Parameters

{Function} fnCallback
The function to debounce. The context and parameters sent to the debounced function will be sent to this function.
{number} msBetweenCalls
The amount of milliseconds that must pass since the last call to this function before fnCallback will be invoked.
{boolean=} opt_immediate Optional, Default:false
Specify true if the debounce function should run immediately instead of initially waiting for the delay. If true is specified, when the debounced function runs, if the delay has elapsed, the value returned from the debounced function will be that which was returned by fnCallback.

Returns

{Function}
The debounced copy of fnCallback.