"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.throttle = void 0;
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);
    }
  };
};
exports.throttle = throttle;
//# sourceMappingURL=throttle.js.map