platform-bible-utils
    Preparing search index...

    Function debounce

    • Get a function that reduces calls to the function passed in

      Type Parameters

      • TFunc extends (...args: any[]) => any

      Parameters

      • fn: TFunc

        The function to debounce

      • delay: number = 300

        How much delay in milliseconds after the most recent call to the debounced function to call the function

      Returns (...args: Parameters<TFunc>) => Promise<ReturnType<TFunc>>

      Function that, when called, only calls the function passed in at maximum every delay ms