Atomic counters and rate limiting tools. Limit resource access at any scale.
Thank you @svsool
getTokensRemaining
with RateLimiterPostgres fixed. https://github.com/animir/node-rate-limiter-flexible/issues/125
clearExpiredByTimeout
is added to TS types for MySQL and Postgres limiters. https://github.com/animir/node-rate-limiter-flexible/issues/156
browser
package.json settings to allow bundling. https://github.com/animir/node-rate-limiter-flexible/commit/6ce34b394a2b82e36ab959eb884e475b5dad5fcc Thank you @achingbrainnodejs.util.inspect.custom
for Symbol flexibility. https://github.com/animir/node-rate-limiter-flexible/commit/2c8bedb973c3931a068ba23b5207763ecc26f988 Thank you @shlavikinmemoryBlockOnConsumed
and inmemoryBlockDuration
options are renamed to inMemoryBlockOnConsumed
and inMemoryBlockDuration
. Old options are still supported, but deprecated and will be removed in v3 major release. https://github.com/animir/node-rate-limiter-flexible/issues/106
mongoose
client. Thank you @adrianvlupuget
method. It incorrectly processed undefined
result from a store. Thank you @animir.editorconfig
added. Thank you @vinibeloniRateLimiterQueueError
added. Thank you @adilhafeezdeleteInMemoryBlockedAll
method is added. Thank you @animirreplaceOne
with findOneAndUpdate
to fix a bug related to absent ops
attribute in MongoDB client v4+. Thank you @vdiezdelete
method on any store limiter deletes inMemoryBlocked key if it is there. Thank you @evan361425deleteInMemoryBlockedAll
method added to clean up all blocked keys at once. Thank you @evan361425 again :-)Every time consume
method executed, it returns msBeforeNext
milliseconds. This can be used to block key in memory for exact msBeforeNext
milliseconds until points are reset on store. Set inmemoryBlockOnConsumed
option and omit inmemoryBlockDuration
for this feature.
Allow traffic bursts with BurstyRateLimiter
Changes
BREAKING CHANGES:
isWhite
and isBlack
getters/setters and options support removed from RLWrapperBlackAndWhite
. isWhiteListed
and isBlackListed
options should be used instead.IRateLimiterResOptions
interface type removed from lib/index.d.ts. IRateLimiterRes
should be used.