function throttle(fn, interval) {
  let timeout;
  return (...arg) => {
    const that = this;
    const args = arg;
    if (!timeout) {
      timeout = setTimeout(() => {
        timeout = null;
        fn.apply(that, args);
      }, interval);
    }
  };
}
/**
 * @desc throttle fn
 * @param fn function
 * @param interval Delay in milliseconds
 */
@desc throttle fn
@param fn function
@param interval Delay in milliseconds
@desc throttle fn @param fn function @param interval Delay in milliseconds
function throttle(fn, interval) {
  let timeout;
  return (...arg) => {
    const that = this;
    const args = arg;
    if (!timeout) {
      timeout = setTimeout(() => {
        timeout = null;
        fn.apply(that, args);
      }, interval);
    }
  };
}
function throttle ( fn , interval ) { let timeout ; return ( ... arg ) => { const that = this ; const args = arg ; if ( ! timeout ) { timeout = setTimeout ( ( ) => { timeout = null ; fn . apply ( that , args ) ; } , interval ) ; } } ; }
@desc throttle fn
 @param fn function
 @param interval Delay in milliseconds
@desc throttle fn @param fn function @param interval Delay in milliseconds