const debounceFunction = (func, timeout = 100) => {
  let timer;
  return (...args) => {
    clearTimeout(timer);
    timer = setTimeout(() => {
      if (typeof func === "function") {
        func.apply(void 0, args);
      }
    }, timeout);
  };
};

export { debounceFunction };
