- Fix devDependencies.
- Converted to Typescript.
- Callback API is removed. Only Promises are available.
- Prefer
import SlidingWindowRateLimiter from 'sliding-window-rate-limiter'
syntax. - Mocha for tests.
- Use ioredis@4 because of new
maxRetriesPerRequest
option. - Dropped support for Node < 6
reconnectTimeout
option of safe limiter renamed toreuseRedisAfter
.- Redis client calls are wrapped with try/catch and then return error asynchronously.
- Typescript: support
esModuleInterop
compiler option.
- New
SafeRedis
backend. - Method
cancel
returns the number of canceled reservations and doesn't havelimit
argument anymore.
SlidingWindowRateLimiter.createLimiter
is a factory method which returns proper backed based on options.- Use Redis-less backend if
redis
option is not defined.
limit
is a argument of methods.- New method
cancel
. - Exports also as a class and namespace and the default.
- Typescript typings.
- Initial release