Comparing version 1.1.0 to 1.1.1
{ | ||
"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.0", | ||
"version": "1.1.1", | ||
"author": "John Hurliman <jhurliman@jhurliman.org>", | ||
@@ -20,2 +20,3 @@ "scripts": { | ||
"main": "./index.js", | ||
"types": "./index.d.ts", | ||
"licenses": [{ | ||
@@ -22,0 +23,0 @@ "type": "MIT", |
# limiter # | ||
[![Build Status](https://travis-ci.org/jhurliman/node-rate-limiter.png)](https://travis-ci.org/jhurliman/node-rate-limiter) | ||
[![NPM Downloads](https://img.shields.io/npm/dm/rate-limiter.svg?style=flat)](https://www.npmjs.com/package/limiter) | ||
[![NPM Downloads](https://img.shields.io/npm/dm/limiter.svg?style=flat)](https://www.npmjs.com/package/limiter) | ||
@@ -64,3 +64,3 @@ Provides a generic rate limiter for node.js. Useful for API clients, web | ||
limiter.removeTokens(1, function(err, remainingRequests) { | ||
if (remainingRequests < 0) { | ||
if (remainingRequests < 1) { | ||
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
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
20939
11
358