This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/es-toolkit/dist/compat/function/throttle.mjs
T

13 lines
293 B
JavaScript

import { debounce } from './debounce.mjs';
function throttle(func, throttleMs = 0, options = {}) {
const { leading = true, trailing = true } = options;
return debounce(func, throttleMs, {
leading,
maxWait: throttleMs,
trailing,
});
}
export { throttle };