You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@upstash/ratelimit

Package Overview
Dependencies
Maintainers
5
Versions
252
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@upstash/ratelimit - npm Package Compare versions

Comparing version

to
0.3.2

4

./dist/index.js

@@ -227,3 +227,3 @@ "use strict";

this.limiter = config.limiter;
this.timeout = config.timeout;
this.timeout = config.timeout ?? 5e3;
this.prefix = config.prefix ?? "@upstash/ratelimit";

@@ -245,3 +245,3 @@ this.analytics = config.analytics !== false ? new Analytics({

const arr = [this.limiter(this.ctx, key)];
if (this.timeout) {
if (this.timeout > 0) {
arr.push(

@@ -248,0 +248,0 @@ new Promise((resolve) => {

@@ -174,2 +174,4 @@ import { Redis } from '@upstash/redis';

* Use this if you want to allow requests in case of network problems
*
* @default 5000
*/

@@ -204,3 +206,3 @@ timeout?: number;

protected readonly prefix: string;
protected readonly timeout?: number;
protected readonly timeout: number;
protected readonly analytics?: Analytics;

@@ -207,0 +209,0 @@ constructor(config: RatelimitConfig<TContext>);

@@ -227,3 +227,3 @@ "use strict";

this.limiter = config.limiter;
this.timeout = config.timeout;
this.timeout = config.timeout ?? 5e3;
this.prefix = config.prefix ?? "@upstash/ratelimit";

@@ -245,3 +245,3 @@ this.analytics = config.analytics !== false ? new Analytics({

const arr = [this.limiter(this.ctx, key)];
if (this.timeout) {
if (this.timeout > 0) {
arr.push(

@@ -248,0 +248,0 @@ new Promise((resolve) => {

{
"name": "@upstash/ratelimit",
"version": "0.3.1",
"version": "0.3.2",
"main": "./dist/index.js",

@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet