Function throttle

will delay numerous call to function fn to once per specified threshhold period.

  • Parameters

    • fn: Function

      callback function

    • threshhold: number = 250

      period to wait in milliseconds

    • ...args: any[]

      the arguments to pass to function fn

    Returns () => void