diff options
author | Kat Marchán <kzm@zkat.tech> | 2018-08-09 06:48:23 +0300 |
---|---|---|
committer | Kat Marchán <kzm@zkat.tech> | 2018-08-09 06:49:55 +0300 |
commit | 866d776c27f80a71309389aaab42825b2a0916f6 (patch) | |
tree | b4256e1f769f2245c982bae6a344a3fc8405a805 /node_modules/assert-plus | |
parent | 50df1bf691e205b9f13e0fff0d51a68772c40561 (diff) |
request@2.87.0
Diffstat (limited to 'node_modules/assert-plus')
-rw-r--r-- | node_modules/assert-plus/CHANGES.md | 6 | ||||
-rw-r--r-- | node_modules/assert-plus/README.md | 9 | ||||
-rw-r--r-- | node_modules/assert-plus/assert.js | 5 | ||||
-rw-r--r-- | node_modules/assert-plus/package.json | 20 |
4 files changed, 29 insertions, 11 deletions
diff --git a/node_modules/assert-plus/CHANGES.md b/node_modules/assert-plus/CHANGES.md index d249d9b2a..57d92bfdb 100644 --- a/node_modules/assert-plus/CHANGES.md +++ b/node_modules/assert-plus/CHANGES.md @@ -1,5 +1,11 @@ # assert-plus Changelog +## 1.0.0 + +- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input +- Add assert.finite check. Previous assert.number callers should use this if + they expect Infinity inputs to throw. + ## 0.2.0 - Fix `assert.object(null)` so it throws diff --git a/node_modules/assert-plus/README.md b/node_modules/assert-plus/README.md index 0b39593ce..ec200d161 100644 --- a/node_modules/assert-plus/README.md +++ b/node_modules/assert-plus/README.md @@ -74,41 +74,48 @@ The complete list of APIs is: * assert.buffer * assert.func * assert.number +* assert.finite * assert.object * assert.string * assert.stream * assert.date -* assert.regex +* assert.regexp * assert.uuid * assert.arrayOfArray * assert.arrayOfBool * assert.arrayOfBuffer * assert.arrayOfFunc * assert.arrayOfNumber +* assert.arrayOfFinite * assert.arrayOfObject * assert.arrayOfString * assert.arrayOfStream * assert.arrayOfDate +* assert.arrayOfRegexp * assert.arrayOfUuid * assert.optionalArray * assert.optionalBool * assert.optionalBuffer * assert.optionalFunc * assert.optionalNumber +* assert.optionalFinite * assert.optionalObject * assert.optionalString * assert.optionalStream * assert.optionalDate +* assert.optionalRegexp * assert.optionalUuid * assert.optionalArrayOfArray * assert.optionalArrayOfBool * assert.optionalArrayOfBuffer * assert.optionalArrayOfFunc * assert.optionalArrayOfNumber +* assert.optionalArrayOfFinite * assert.optionalArrayOfObject * assert.optionalArrayOfString * assert.optionalArrayOfStream * assert.optionalArrayOfDate +* assert.optionalArrayOfRegexp * assert.optionalArrayOfUuid * assert.AssertionError * assert.fail diff --git a/node_modules/assert-plus/assert.js b/node_modules/assert-plus/assert.js index 6bce4d8c6..26f944eec 100644 --- a/node_modules/assert-plus/assert.js +++ b/node_modules/assert-plus/assert.js @@ -56,6 +56,11 @@ var types = { }, number: { check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg); + } + }, + finite: { + check: function (arg) { return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); } }, diff --git a/node_modules/assert-plus/package.json b/node_modules/assert-plus/package.json index a16c864fb..0326f1a8a 100644 --- a/node_modules/assert-plus/package.json +++ b/node_modules/assert-plus/package.json @@ -1,26 +1,26 @@ { - "_from": "assert-plus@^0.2.0", - "_id": "assert-plus@0.2.0", + "_from": "assert-plus@^1.0.0", + "_id": "assert-plus@1.0.0", "_inBundle": false, - "_integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", + "_integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "_location": "/assert-plus", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "assert-plus@^0.2.0", + "raw": "assert-plus@^1.0.0", "name": "assert-plus", "escapedName": "assert-plus", - "rawSpec": "^0.2.0", + "rawSpec": "^1.0.0", "saveSpec": null, - "fetchSpec": "^0.2.0" + "fetchSpec": "^1.0.0" }, "_requiredBy": [ "/http-signature" ], - "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "_shasum": "d74e1b87e7affc0db8aadb7021f3fe48101ab234", - "_spec": "assert-plus@^0.2.0", + "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525", + "_spec": "assert-plus@^1.0.0", "_where": "/Users/zkat/Documents/code/work/npm/node_modules/http-signature", "author": { "name": "Mark Cavage", @@ -78,5 +78,5 @@ "scripts": { "test": "tape tests/*.js | ./node_modules/.bin/faucet" }, - "version": "0.2.0" + "version": "1.0.0" } |