custom-card-helpers
    Preparing search index...

    Function debounce

    • Returns a function, that, as long as it continues to be invoked, will not be triggered. It will be called after it stops being called for wait ms. This can be usefull for ResizeObservers for example.

      Type Parameters

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

      Parameters

      • func: T

        The function you want to debounce

      • wait: number

        Period to wait in ms

      • immediate: boolean = false

        Triggering on the leading edge instead of the trailing

      Returns T

      Debounced Function