export const preventShake=(()=>{const e=(e,t,o)=>e&&"function"==typeof e?isNaN(parseInt(t))?()=>console.log("时间必须为整数"):o(e,t=parseInt(t)):()=>console.log("必须输入函数参数");return{debounce:(t,o)=>e(t,o,((e,t)=>{let o=null;return n=>{o&&clearTimeout(o),o=setTimeout((()=>e(n)),t)}})),immediate:(t,o)=>e(t,o,((e,t)=>{let o=null,n=!0;return l=>{n?(n=!1,e(l)):o&&clearTimeout(o),o=setTimeout((()=>{n=!0}),t)}}))}})();