API Reference

Returns a throttled version of an async function. The throttled version can only execute once every N milliseconds, where N is the delay passed in to the throttle function.

function throttle<T extends Func | AsyncFunc>(func: T, delay = 0)

NOTE: If the function is called again before the necessary time has passed since last calling the function, the subsequent execution is queued and will occur once the time has passed.