melonjs
    Preparing search index...

    Function throttle

    • returns a function that, when invoked will only be triggered at most once during a given window of time

      Parameters

      • fn: () => void

        the function to be throttled.

      • Optionalwait: number = 100

        the delay in ms

      Returns (...args: []) => void

      the function that will be throttled