Functions
debounce
- debounce(callback: Function, wait: number, immediate: boolean): function
-
Parameters
-
callback: Function
-
wait: number
-
Optional immediate: boolean
Returns function
A debounced function
memoize
- memoize(callback: Function): Function
-
Parameters
Returns Function
memoizeSimple
- memoizeSimple(callback: Function): Function
-
Parameters
Returns Function
repeatUntil
- repeatUntil(condition: Function, action: Function, timeout?: number, interval?: number): Promise<void>
-
Parameters
-
condition: Function
-
action: Function
-
Default value timeout: number = 0
-
Default value interval: number = 100
Returns Promise<void>
runOnceOnChange
- runOnceOnChange(callback: Function): (Anonymous function)
-
Parameters
Returns (Anonymous function)
runOnlyOnce
- runOnlyOnce(callback: Function): Function
-
Parameters
Returns Function
setDefault
- setDefault(value: any, defaultValue: any): any
-
Parameters
-
value: any
-
defaultValue: any
Returns any
throttle
- throttle(callback: Function, wait: number): function
-
Parameters
-
callback: Function
-
wait: number
Returns function
times
- times(count: number, callback: Function): void
-
Parameters
-
count: number
-
callback: Function
Returns void
wait
- wait(time: number): Promise<void>
-
Parameters
Returns Promise<void>
waitUntil
- waitUntil(condition: Function, timeout?: number, interval?: number): Promise<void>
-
Parameters
-
condition: Function
-
Default value timeout: number = 0
-
Default value interval: number = 100
Returns Promise<void>