jhurliman / node-rate-limiter

A generic rate limiter for node.js. Useful for API clients, web crawling, or other tasks that need to be throttled
MIT License
1.51k stars 135 forks source link

removeTokens 1st parameter documentation #67

Closed sdancer75 closed 3 years ago

sdancer75 commented 3 years ago

Documentation does not say anything. The 1st parameter of the removeTokensis the number of requests to be removed?

limiter.removeTokens(1, function(err, remainingRequests)

jhurliman commented 3 years ago

This is documented in the JSDoc:

* @param count The number of tokens to remove.