limitd-client
Advanced tools
Comparing version 2.4.2 to 2.4.3
@@ -272,2 +272,6 @@ const url = require('url'); | ||
if (typeof key !== 'string') { | ||
key = ''; | ||
} | ||
const request = { | ||
@@ -312,2 +316,6 @@ 'id': this.nextId(), | ||
if (typeof key !== 'string') { | ||
key = ''; | ||
} | ||
const request = { | ||
@@ -335,2 +343,6 @@ 'id': this.nextId(), | ||
LimitdClient.prototype.status = function (type, key, done) { | ||
if (typeof key !== 'string') { | ||
key = ''; | ||
} | ||
const request = { | ||
@@ -337,0 +349,0 @@ 'id': this.nextId(), |
{ | ||
"name": "limitd-client", | ||
"version": "2.4.2", | ||
"version": "2.4.3", | ||
"description": "limitd client for node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -101,2 +101,15 @@ const LimitdClient = require('../'); | ||
it('should send type "" if undefined', function (done) { | ||
server.once('request', function (request) { | ||
assert.isNumber(request.id); | ||
assert.equal(request.method, 'STATUS'); | ||
assert.equal(request.type, 'ip'); | ||
assert.equal(request.key, ''); | ||
done(); | ||
}); | ||
client.status('ip', undefined, function () {}); | ||
}); | ||
it('should be able to parse the response of TAKE', function (done) { | ||
@@ -103,0 +116,0 @@ |
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
38981
1013