• Throttle a function with a given delay. Similar to lodash.

    Throttling F for a delay of D means that F will be called no more than 1 time every D. In this implementation, F is called after D has passed since the previous non-throttled invocation

    Parameters

    • func: (() => void)

      Function to throttle

        • (): void
        • Returns void

    • delay: number

      Throttle delay

    Returns ThrottledFunction