platform-bible-utils
    Preparing search index...

    Function debounce

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

      Type Parameters

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

        A function type that takes any arguments and returns void. This is the type of the function being debounced.

      Parameters

      • fn: T

        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 T

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