const n = (t, u) => {
  let l = null;
  return u === 0 ? t : (...e) => {
    l !== null && (clearTimeout(l), l = null), l = setTimeout(() => t(...e), u);
  };
}, r = (t, u) => {
  let l = null;
  return u === 0 ? t : (...e) => {
    l === null && (l = setTimeout(() => {
      t(...e), l = null;
    }, u));
  };
};
export {
  n as o,
  r
};
