rolling-rate-limiter
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "rolling-rate-limiter", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Rate limiter that supports a rolling window, either in-memory or backed by Redis", | ||
"main": "index.js", | ||
"scripts": { | ||
"lint": "eslint . --fix", | ||
"lint": "eslint ./src --fix", | ||
"prepublish": "tsc", | ||
"test": "jest" | ||
@@ -9,0 +10,0 @@ }, |
@@ -12,2 +12,12 @@ # Rolling Rate Limiter | ||
## Upgrading from 0.1 | ||
Version 0.2 was released August 31 2020. The method of operation remains the same, but the API has changed. A short summary of the changes: | ||
* Library was rewritten in Typescript. | ||
* Rate limiters are now instances of a `RateLimiter` class. | ||
* Methods now use promises instead of callbacks. | ||
* A `wouldLimit` method is now available to see if an action would be blocked, without actually "counting" it as an action. | ||
* `limitWithInfo` and `wouldLimitWithInfo` methods are available to return more information about how and why an action was blocked or not blocked. | ||
* Tests were rewritten in Jest, and run on both `redis` and `ioredis` clients. | ||
## Quick start | ||
@@ -14,0 +24,0 @@ Basic use in an Express application. |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
27293
81
0