Creates a throttled function that only invokes func at most once per every wait milliseconds.
The throttled function comes with a cancel method to cancel delayed invocations and a flush method to immediately invoke them.
Provide an options object to indicate whether func should be invoked on the leading and/or trailing edge of the wait timeout.
Subsequent calls to the throttled function return the result of the last func invocation.
See David Corbacho's article for details over the differences between _.debounce and _.throttle.
Creates a throttled function that only invokes func at most once per every wait milliseconds. The throttled function comes with a cancel method to cancel delayed invocations and a flush method to immediately invoke them. Provide an options object to indicate whether func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled function return the result of the last func invocation.
See David Corbacho's article for details over the differences between _.debounce and _.throttle.