Overview
The API includes two common utility functions for controlling execution frequency.api.debounce(fn, delay?)
Returns a debounced version offn. The function only executes after delay milliseconds of inactivity.
Signature
Returns:
function — debounced wrapper
api.throttle(fn, limit?)
Returns a throttled version offn. The function executes at most once every limit milliseconds.
Signature
Returns:
function — throttled wrapper