Ad
  • Custom User Avatar

    Idea of "throttle" decorator is running function not more often than given time.

    So decorator need somehow keep function call context (arguments and this), updates it after following calls during time period and after time period calls function with last saved arguments/this.

    There is no tests in this kata which could be used for check out that we call function with last arguments/this or just call new function after some cooldown period. So in seems this kata suppose creating some sort of synchronous debounce decorator, that looks inapplicable.