Gleam - v1.0.2
    Preparing search index...

    Function throttleByKey

    • Like throttle, but tracks the last firing independently per key — different keys never throttle each other. Use for de-duplicating repeated error/warning logs by message identity. When the throttle fires, args from the most recent call for that key are passed through alongside callCount.

      Type Parameters

      • T extends unknown[]

      Parameters

      • callback: (callCount: number, ...args: T) => void
      • delay: number = 1000

      Returns (key: string, ...args: T) => void