• Create throttling function.

    Returned function will execute after defined delayed. Multiple calls will be discarded until the callback is executed and new timeout can start.

    Parameters

    • callback: Function

      Callback function

    • delay: number

      Delay in milliseconds

    Returns Function