我遇到了我们使用 lodash 的油门来避免不必要的函数调用的功能,如下所示。
export const helperFn = throttle((args) => console.log(args), 1000)
我想模拟lodash的油门功能。模拟节流 fn 的最佳方法是什么。
我遇到了我们使用 lodash 的油门来避免不必要的函数调用的功能,如下所示。
export const helperFn = throttle((args) => console.log(args), 1000)
我想模拟lodash的油门功能。模拟节流 fn 的最佳方法是什么。