rate-limiter-flexible
Advanced tools
Comparing version 0.22.3 to 0.22.4
@@ -0,1 +1,3 @@ | ||
const util = require('util'); | ||
module.exports = class RateLimiterRes { | ||
@@ -43,2 +45,23 @@ constructor(remainingPoints, msBeforeNext, consumedPoints, isFirstInDuration) { | ||
} | ||
_getDecoratedProperties() { | ||
return { | ||
remainingPoints: this.remainingPoints, | ||
msBeforeNext: this.msBeforeNext, | ||
consumedPoints: this.consumedPoints, | ||
isFirstInDuration: this.isFirstInDuration, | ||
}; | ||
} | ||
[util.inspect.custom]() { | ||
return this._getDecoratedProperties(); | ||
} | ||
toString() { | ||
return JSON.stringify(this._getDecoratedProperties()); | ||
} | ||
toJSON() { | ||
return this._getDecoratedProperties(); | ||
} | ||
}; |
{ | ||
"name": "rate-limiter-flexible", | ||
"version": "0.22.3", | ||
"version": "0.22.4", | ||
"description": "Flexible API rate limiter backed by Redis for distributed node.js applications", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83998
2231