Vinyl
    Preparing search index...

    Function debounce

    • Debounce wraps a callback, ensuring it only executes after a certain period of inactivity.

      Parameters

      • inner: () => void

        The function to execute after a given period of inactivity.

      • duration: number

        The number of seconds the returned wrapper function must not be called before the inner function is invoked.

      Returns DebounceCallback

      Returns callback wrapper that enforces inactivity. This may be disposed.