Function debounce

  • Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since the last time the debounced function was invoked. Subsequent calls to the debounced function return the result of the last successful invocation. Provide options to set the maxWait milliseconds, regardless of when the function was last invoked.


    Returns the new debounced function.


    • func: Function<any>

      The function to debounce.

    • wait: number

      The number of milliseconds to delay.

    • Optional opts: {
          maxWait?: number;
      } = {}

      The maximum time func is allowed to be delayed before it's invoked.

      • Optional maxWait?: number

    Returns Function

Generated using TypeDoc