@vsokolov/utils - v0.32.0
    Preparing search index...

    Function debounce

    • Debouncing used to improve the performance of frequently executed actions, by delaying them, grouping them, and only executing the last call.

      Type Parameters

      • T extends unknown[]

      Parameters

      • fn: (...args: T) => void

        Function to debounce

      • delay: number

        Function delay

      Returns (...args: T) => void & { flush: () => void }

      new function