node-rate-limiter-flexible
node-rate-limiter-flexible copied to clipboard
Future major v8 notes
-
blockDurationoption should be undefined by default, so0can be used to block keys forever. - Make sure
RateLimiterQueueis created with defaultmaxQueueSizeeven if it isn't set in options object, e.g.new RateLimiterQueue(memoryLimiter, {})shouldn't result tomaxQueueSizeset toundefined. - Support for
pointsset to 0 and never limit in this case. It is useful for atomic counters.
consider adjusting the cb of the different implementations to return asynchronously if tableCreated: true - its not consistent w/ the other times cb is called.
another better design would be to have private constructors and a factory method that returns a promise