Function debounce

will 'group' numerous call to fn if the calls occurs in delay interval parameter more info : https://css-tricks.com/debouncing-throttling-explained-examples/ to see the visual difference: http://demo.nimius.net/debounce_throttle/

  • Type Parameters

    • T extends Function

    Parameters

    • fn: T

      callback function to be called

    • delay: number = 20

      to wait in milliseconds between numerous call

    Returns T