sodiray / radash

Functional utility library - modern, simple, typed, powerful
https://radash-docs.vercel.app
MIT License
4.31k stars 173 forks source link

Debounce flush does not cancel the delayed invocation #256

Open christhofer opened 1 year ago

christhofer commented 1 year ago

debounce.flush() triggers the function but does not cancel the debounce call. So the function run twice.

Meanwhile Lodash stop the debounce call on flush, so the function only run once.

Reproduction Radash vs Lodash Debounce

image