const throttle=function(fn,wait=1500){
    var flag = true;
    var timer = null;
    return function(){
      if(flag) {
        fn.apply(this,arguments);
        flag = false;
        timer = setTimeout(() => {
          flag = true
        },wait)
      }
    }
  }
  export {throttle}