debounce-with-result
A debounce variation that returns a result as a Promise
Installation
npm install debounce-with-result
Usage
Just like the debounce
that we all know and love, except that this one returns a Promise
.
{ console;} let doSomethingDebounced = ;// `doSomething()` runs only once;;; { console; return 5;} let getSomethingDebounced = ;// `getSomething()` runs only once and three logs appear;;;