mirror of
https://github.com/scratchfoundation/node-redis-rate-limiter.git
synced 2024-11-28 10:16:26 -05:00
Updated all dependencies + Snyk badge to show vulnerabilities
Async version
This commit is contained in:
parent
5ac08defb0
commit
3214570b7b
4 changed files with 12 additions and 10 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
/node_modules
|
||||
/dump.rdb
|
||||
.DS_Store
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
[![Build Status](http://img.shields.io/travis/TabDigital/redis-rate-limiter.svg?style=flat)](http://travis-ci.org/TabDigital/redis-rate-limiter)
|
||||
[![Dependencies](http://img.shields.io/david/TabDigital/redis-rate-limiter.svg?style=flat)](https://david-dm.org/TabDigital/redis-rate-limiter)
|
||||
[![Dev dependencies](http://img.shields.io/david/dev/TabDigital/redis-rate-limiter.svg?style=flat)](https://david-dm.org/TabDigital/redis-rate-limiter)
|
||||
[![Known Vulnerabilities](https://snyk.io/package/npm/redis-rate-limiter/badge.svg)](https://snyk.io/package/npm/redis-rate-limiter)
|
||||
|
||||
Rate-limit any operation, backed by Redis.
|
||||
|
||||
|
|
18
package.json
18
package.json
|
@ -9,16 +9,16 @@
|
|||
"test": "./node_modules/.bin/mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"ip": "~0.3.1",
|
||||
"moment": "~2.8.1"
|
||||
"ip": "~1.1.2",
|
||||
"moment": "~2.12.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"async": "~0.9.0",
|
||||
"express": "~4.9.5",
|
||||
"lodash": "~2.4.1",
|
||||
"mocha": "~1.21.4",
|
||||
"redis": "~0.12.1",
|
||||
"should": "~4.0.4",
|
||||
"supertest": "~0.13.0"
|
||||
"async": "~1.5.2",
|
||||
"express": "~4.13.4",
|
||||
"lodash": "~4.6.1",
|
||||
"mocha": "~2.4.5",
|
||||
"redis": "~2.6.0-0",
|
||||
"should": "~8.3.0",
|
||||
"supertest": "~1.2.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ describe('Rate-limiter', function() {
|
|||
var limiter = createLimiter('10/second');
|
||||
var reqs = request(limiter, 5, {id: 'a'});
|
||||
async.parallel(reqs, function(err, rates) {
|
||||
_.pluck(rates, 'current').should.eql([1, 2, 3, 4, 5]);
|
||||
_.map(rates, 'current').should.eql([1, 2, 3, 4, 5]);
|
||||
_.each(rates, function(r) {
|
||||
r.key.should.eql('a');
|
||||
r.limit.should.eql(10);
|
||||
|
|
Loading…
Reference in a new issue