ez-lodash
v1.0.1
Published
> npm i ez-lodash ## 在项目中导入 ``` import {debounce,throttle} from 'ez-lodash ``` ## 使用防抖 ``` debounce(timer,function(){ // Write the code you want to execute // 写入你需要防抖的代码 }) ``` ## 使用节流 ``` throttle(timer,function(){ // Write the code
Downloads
1
Readme
ez-loadsh是轻量级的防抖节流包
我们可以通过npm去安装这个包
npm i ez-lodash
在项目中导入
import {debounce,throttle} from 'ez-lodash使用防抖
debounce(timer,function(){
// Write the code you want to execute
// 写入你需要防抖的代码
})使用节流
throttle(timer,function(){
// Write the code you want to execute
// 写入你需要节流的代码
})