Methods
debounce
- debounce(fn: Function, delay?: undefined | number, option?: undefined | object): Function
-
Parameters
-
fn: Function
-
Optional delay: undefined | number
-
Optional option: undefined | object
Returns Function
debounceWrap
- debounceWrap(delay?: undefined | number, option?: undefined | object): Function
-
Parameters
-
Optional delay: undefined | number
-
Optional option: undefined | object
Returns Function
throttle
- throttle(fn: Function, delay?: undefined | number, option?: undefined | object): Function
-
Parameters
-
fn: Function
-
Optional delay: undefined | number
-
Optional option: undefined | object
Returns Function
throttleWrap
- throttleWrap(delay?: undefined | number, option?: undefined | object): Function
-
Parameters
-
Optional delay: undefined | number
-
Optional option: undefined | object
Returns Function
防抖装饰器
const func = () => { doSomething() } const funcThrottle = utils.debounce(func)