diff --git a/index.js b/index.js index a909b05..9c0f306 100644 --- a/index.js +++ b/index.js @@ -188,7 +188,7 @@ function parseipNotation (note) { range = null } - if (range <= 0 || range > max) { + if (range === null || range < 0 || range > max) { throw new TypeError('invalid range on address: ' + note) } diff --git a/package.json b/package.json index 4afab4e..227ed8f 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,11 @@ }, "dependencies": { "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" + "ipaddr.js": "^2.2.0" }, "devDependencies": { - "benchmark": "2.1.4", "beautify-benchmark": "0.2.4", + "benchmark": "2.1.4", "deep-equal": "1.1.2", "eslint": "7.26.0", "eslint-config-standard": "14.1.1",