Module: webgis4u/util/function/debounce

Methods

(static) debounce(func, wait, immediate) → {function}

Creates a function that will not be called, as long as it continues to be invoked within `wait` milliseconds.
Parameters:
Name Type Description
func function The function that should be debounced
wait number The time in milliseconds that must pass before `func` is called
immediate boolean If true, `func` is called on the leading edge instead of the trailing.
Source:
Returns:
A function, that, as long as it continues to be invoked, will not be triggered.
Type
function