
function singleDelay(func, time) {
  let timeout;

  return function() {
    clearTimeout(timeout)
    timeout = setTimeout(function() {
      func.apply(this, arguments)
    }, time)
  }
}

export {
  singleDelay
}