Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rate-limiter-flexible

Package Overview
Dependencies
Maintainers
1
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rate-limiter-flexible - npm Package Compare versions

Comparing version 0.13.0 to 0.13.1

2

index.js
const RateLimiterRedis = require('./lib/RateLimiterRedis');
const RateLimiterMongo = require('./lib/RateLimiterMongo');
const RateLimiterMySQL = require('./lib/RateLimiterMySQL');
const { RateLimiterClusterMaster, RateLimiterCluster } = require('./lib/RateLimiterCluster');

@@ -9,2 +10,3 @@ const RateLimiterMemory = require('./lib/RateLimiterMemory');

RateLimiterMongo,
RateLimiterMySQL,
RateLimiterMemory,

@@ -11,0 +13,0 @@ RateLimiterClusterMaster,

2

lib/RateLimiterMySQL.js

@@ -34,3 +34,3 @@ const RateLimiterStoreAbstract = require('./RateLimiterStoreAbstract');

this._clearExpiredTimeoutId = setTimeout(() => {
const expire = new Date(Date.now() + 3600000);
const expire = new Date(Date.now() - 3600000);
this.client.query(`DELETE FROM ${this.tableName} WHERE expire < ?`, [expire], () => {

@@ -37,0 +37,0 @@ this._clearExpiredHourAgo();

{
"name": "rate-limiter-flexible",
"version": "0.13.0",
"version": "0.13.1",
"description": "Flexible API rate limiter backed by Redis for distributed node.js applications",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -29,3 +29,3 @@ [![Build Status](https://travis-ci.org/animir/node-rate-limiter-flexible.png)](https://travis-ci.org/animir/node-rate-limiter-flexible)

* no prod dependencies
* Redis and Mongo errors don't result to broken app if `insuranceLimiter` set up
* MySQL, Redis and Mongo errors don't result to broken app if `insuranceLimiter` set up
* useful `block`, `penalty` and `reward` methods

@@ -32,0 +32,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc