Open kayleQubit opened 4 years ago
Added a simple throttle function. It will take a function and limit invocations within a time defined in second parameter:
var thr = throttle(tothr, 90) thr() thr() setTimeout(() => thr(), 30) setTimeout(() => thr(), 110)
would expect to have called the function only twice.
Added a simple throttle function. It will take a function and limit invocations within a time defined in second parameter:
var thr = throttle(tothr, 90) thr() thr() setTimeout(() => thr(), 30) setTimeout(() => thr(), 110)
would expect to have called the function only twice.