rate-limiter-flexible 2.3.1 → 2.3.2
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/.editorconfig +13 -0
- package/lib/RateLimiterMongo.js +6 -1
- package/package.json +1 -1
package/.editorconfig
ADDED
package/lib/RateLimiterMongo.js
CHANGED
|
@@ -8,7 +8,12 @@ const RateLimiterRes = require('./RateLimiterRes');
|
|
|
8
8
|
*/
|
|
9
9
|
function getDriverVersion(client) {
|
|
10
10
|
try {
|
|
11
|
-
|
|
11
|
+
let version;
|
|
12
|
+
if (client.client) {
|
|
13
|
+
({ version } = client.client.topology.s.options.metadata.driver);
|
|
14
|
+
} else {
|
|
15
|
+
({ version } = client.topology.s.options.metadata.driver);
|
|
16
|
+
}
|
|
12
17
|
const majorVersion = parseInt(version);
|
|
13
18
|
|
|
14
19
|
return majorVersion;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rate-limiter-flexible",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
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": {
|