We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was not sure if the example was wrong or if I was just dumb:
import pDebounce from 'p-debounce'; const expensiveCall = async (input) => input; const debouncedFn = pDebounce(expensiveCall, 200); for (const number of [1, 2, 3]) { console.log(await debouncedFn(number)); }
outputs:
1 2 3
README says:
3 3 3
Also I'm not sure this example demonstrates the value of the lib. Calling expensiveCall alone in the for loop would produce the same output.
expensiveCall
for
The text was updated successfully, but these errors were encountered:
can confirm, came here to say this
Sorry, something went wrong.
just opened a PR to fix the examples, they are both wrong actually
here it is: #25
1ba9d31
No branches or pull requests
I was not sure if the example was wrong or if I was just dumb:
outputs:
README says:
Also I'm not sure this example demonstrates the value of the lib. Calling
expensiveCall
alone in thefor
loop would produce the same output.The text was updated successfully, but these errors were encountered: