Tool-Shack
    Preparing search index...

    Function throttle

    • Creates a throttled function that only invokes callback at most once per every limit milliseconds

      Type Parameters

      • T extends (...args: unknown[]) => unknown

      Parameters

      • callback: T

        Function to throttle

      • limit: number = 300

        Milliseconds to limit invocations

      Returns IThrottledFunction<T>

      Throttled function with cancel method