Closed jhurliman closed 3 years ago
This is a major rewrite of the library, porting to TypeScript and switching from callbacks to promises. Major changes:
process
Promise<number>
callback(err, remainingTokens)
RateLimiter
TokenBucket
This is a major rewrite of the library, porting to TypeScript and switching from callbacks to promises. Major changes:
process
, the library is now fully compatible with web and node.jsPromise<number>
and throw on error instead ofcallback(err, remainingTokens)
RateLimiter
andTokenBucket
constructors take an options object rather than a list of arguments