@studiometa/js-toolkit
Version:
A set of useful little bits of JavaScript to boost your project! 🚀
9 lines (8 loc) • 349 B
TypeScript
/**
* Simple throttling helper that limits a function to only run once every {delay}ms.
*
* @param {Function} fn The function to throttle
* @param {number} [delay] The delay in ms
* @returns {Function} The throttled function.
*/
export declare function throttle(fn: (...args: unknown[]) => void, delay?: number): (...args: unknown[]) => void;