1.0.0 • Published 3 years ago
js-rate-limiter v1.0.0
SimpleRateLimiter
super simple Requests RateLimiter integrated with lru cache package.
const {RateLimiterSingleton} = require('./dist/index');
//SetRateLimitOptions(timelimit, maximumRequestInTimeLimit);
RateLimiterSingleton.SetRateLimitOptions(4000, 2);
//ThrowLimitExceptionIfNecessary('unique identifier for specific user')
RateLimiterSingleton.GetInstance().ThrowLimitExceptionIfNecessary("2");
1.0.0
3 years ago