Comparing version 1.1.5 to 2.0.0
@@ -0,0 +0,0 @@ Copyright (C) 2011 by John Hurliman |
{ | ||
"name": "limiter", | ||
"description": "A generic rate limiter for node.js. Useful for API clients, web crawling, or other tasks that need to be throttled", | ||
"version": "1.1.5", | ||
"description": "A generic rate limiter for the web and node.js. Useful for API clients, web crawling, or other tasks that need to be throttled", | ||
"version": "2.0.0", | ||
"author": "John Hurliman <jhurliman@jhurliman.org>", | ||
"type": "module", | ||
"main": "./dist/cjs/index.js", | ||
"module": "./dist/esm/index.js", | ||
"browser": "./dist/esm/index.js", | ||
"exports": { | ||
"import": "./dist/esm/index.js", | ||
"require": "./dist/cjs/index.js" | ||
}, | ||
"repository": "git://github.com/jhurliman/node-rate-limiter", | ||
"bugs": { | ||
"url": "http://github.com/jhurliman/node-rate-limiter/issues" | ||
}, | ||
"license": "MIT", | ||
"files": [ | ||
"dist", | ||
"src" | ||
], | ||
"scripts": { | ||
"test": "vows --spec" | ||
"lint": "eslint --fix src", | ||
"prepack": "yarn tsc -p tsconfig.json && tsc -p tsconfig.cjs.json", | ||
"test": "jest src" | ||
}, | ||
"dependencies": { | ||
"just-performance": "4.2.0" | ||
}, | ||
"devDependencies": { | ||
"assert": "1.3.0", | ||
"vows": "0.8.1" | ||
"@babel/core": "^7.13.16", | ||
"@babel/preset-env": "^7.13.15", | ||
"@babel/preset-typescript": "^7.13.0", | ||
"@types/babel__generator": "^7.6.2", | ||
"@types/jest": "^26.0.23", | ||
"@typescript-eslint/eslint-plugin": "^4.22.0", | ||
"@typescript-eslint/parser": "^4.22.0", | ||
"babel-jest": "^26.6.3", | ||
"eslint": "^7.25.0", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
"jest": "^26.6.3", | ||
"prettier": "^2.2.1", | ||
"typescript": "^4.2.4" | ||
}, | ||
"keywords": ["rate", "limiting", "throttling"], | ||
"repository": "git://github.com/jhurliman/node-rate-limiter", | ||
"bugs": { "url": "http://github.com/jhurliman/node-rate-limiter/issues" }, | ||
"directories": { "lib": "./lib/" }, | ||
"main": "./index.js", | ||
"types": "./index.d.ts", | ||
"licenses": [{ | ||
"type": "MIT", | ||
"url": "http://github.com/jhurliman/node-rate-limiter/raw/master/LICENSE.txt" | ||
}] | ||
"keywords": [ | ||
"rate", | ||
"limiting", | ||
"throttling" | ||
] | ||
} |
@@ -64,3 +64,3 @@ # limiter # | ||
limiter.removeTokens(1, function(err, remainingRequests) { | ||
if (remainingRequests < 1) { | ||
if (remainingRequests < 0) { | ||
response.writeHead(429, {'Content-Type': 'text/plain;charset=UTF-8'}); | ||
@@ -67,0 +67,0 @@ response.end('429 Too Many Requests - your IP is being rate limited'); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
229343
59
1289
Yes
1
13
1
+ Addedjust-performance@4.2.0
+ Addedjust-performance@4.2.0(transitive)