rate-limiter-flexible 2.3.9 → 2.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,9 +15,11 @@
15
15
 
16
16
  It works with _Redis_, process _Memory_, _Cluster_ or _PM2_, _Memcached_, _MongoDB_, _MySQL_, _PostgreSQL_ and allows to control requests rate in single process or distributed environment.
17
17
 
18
+ Memory limiter also works in browser.
19
+
18
20
  **Atomic increments.** All operations in memory or distributed environment use atomic increments against race conditions.
19
21
 
20
- **Traffic bursts.** Replace Token Bucket with [BurstyRateLimiter](https://github.com/animir/node-rate-limiter-flexible/wiki/BurstyRateLimiter)
22
+ Allow **traffic bursts** with [BurstyRateLimiter](https://github.com/animir/node-rate-limiter-flexible/wiki/BurstyRateLimiter).
21
23
 
22
24
  **Fast.** Average request takes `0.7ms` in Cluster and `2.5ms` in Distributed application. See [benchmarks](https://github.com/animir/node-rate-limiter-flexible#benchmark).
23
25
 
@@ -1,5 +1,3 @@
1
- const util = require('util');
2
-
3
1
  module.exports = class RateLimiterRes {
4
2
  constructor(remainingPoints, msBeforeNext, consumedPoints, isFirstInDuration) {
5
3
  this.remainingPoints = typeof remainingPoints === 'undefined' ? 0 : remainingPoints; // Remaining points in current duration
@@ -52,7 +50,7 @@ module.exports = class RateLimiterRes {
52
50
  };
53
51
  }
54
52
 
55
- [util.inspect.custom]() {
53
+ [Symbol.for("nodejs.util.inspect.custom")]() {
56
54
  return this._getDecoratedProperties();
57
55
  }
58
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rate-limiter-flexible",
3
- "version": "2.3.9",
3
+ "version": "2.3.10",
4
4
  "description": "Node.js rate limiter by key and protection from DDoS and Brute-Force attacks in process Memory, Redis, MongoDb, Memcached, MySQL, PostgreSQL, Cluster or PM",
5
5
  "main": "index.js",
6
6
  "scripts": {