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 have been wrapping removeTokens in a promise (as suggested in #52) for a while.
removeTokens
Feels like it would be clean and useful if we implemented an asyncRemoveTokens method.
asyncRemoveTokens
function asyncRemoveTokens(count: number, rateLimiter: RateLimiter) { return new Promise((resolve, reject) => { rateLimiter.removeTokens(count, (error, remainingRequests) => { if (error) return reject(error) resolve(remainingRequests) }) }) }
The text was updated successfully, but these errors were encountered:
Sure! I think this could be a member of RateLimiter
RateLimiter
Sorry, something went wrong.
Done in 2.0.0
No branches or pull requests
I have been wrapping
removeTokens
in a promise (as suggested in #52) for a while.Feels like it would be clean and useful if we implemented an
asyncRemoveTokens
method.The text was updated successfully, but these errors were encountered: