New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-redis-rate-limiter

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-redis-rate-limiter - npm Package Compare versions

Comparing version

to
1.2.2

2

lib/middleware.js

@@ -11,3 +11,3 @@ var rateLimiter = require('./rate-limiter');

if (rate.current > rate.limit) {
res.writeHead(429);
res.writeHead(opts.status);
res.end();

@@ -14,0 +14,0 @@ } else {

@@ -52,4 +52,4 @@ var assert = require('assert');

assert.notEqual(getWindow(opts), 0, 'Invalid rate window: ' + getRate(opts));
assert.equal(typeof getSTatus(opts), 'number', 'Invalid status response code: ' + getStatus(opts));
assert.equal(getSTatus(opts), 'number', 'Invalid status response code: ' + getStatus(opts));
assert.equal(typeof getStatus(opts), 'number', 'Invalid status response code: ' + getStatus(opts));
assert.equal(getStatus(opts), 'number', 'Invalid status response type: ' + getStatus(opts));
var validStatuses = new Set([200,429]);

@@ -56,0 +56,0 @@ assert.ok(validStatuses.has(getStatus(opts)),

{
"name": "node-redis-rate-limiter",
"version": "1.2.1",
"version": "1.2.2",
"description": "Rate-limit any operation, backed by Redis",

@@ -5,0 +5,0 @@ "author": "Scratch Foundation",