Function throttle

  • Creates a throttled function that only invokes func at most once per every delay milliseconds (or once per browser frame). See this article for additional details.

    Parameters

    • func: AnyFunc

      Function to throttle.

    • delay: number

      Delay in milliseconds.

    Returns AnyFunc

    The throttled function.