- Source:
Methods
(static) debounce(callback, wait, immediate, valueThis)
- Description:
Returns a function, that, as long as it continues to be invoked, will not be triggered
- Source:
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Function to invoke |
wait |
Number | Amount of time after (milliseconds) |
immediate |
Boolean | trigger the function on the leading edge, instead of the trailing. |
valueThis |
Object | Context for function |
(static) throttle(timer) → {function}
- Description:
Reusable throttle creator
- Source:
Parameters:
Name | Type | Description |
---|---|---|
timer |
function | Function like requestAnimationFrame |
Returns:
Function to be used to create throttled functions based on passed timer
- Type
- function