"use strict";

export const throttle = (fn, ms) => {
  // eslint-disable-next-line functional/no-let
  let lastCall = 0;
  return (...args) => {
    const now = Date.now();
    if (now - lastCall >= ms) {
      lastCall = now;
      fn(...args);
    }
  };
};
//# sourceMappingURL=throttle.js.map