get-ip-range
Advanced tools
Comparing version 2.1.1 to 3.0.0
@@ -0,1 +1,6 @@ | ||
## v3.0.0 | ||
- Refactor to TypeScript | ||
- New error messages introduced | ||
- Export { `getIPRange` } | ||
## v2.1.1 | ||
@@ -2,0 +7,0 @@ - Fix error message |
{ | ||
"name": "get-ip-range", | ||
"version": "2.1.1", | ||
"version": "3.0.0", | ||
"description": "Simple utility to convert either CIDR notation or two IP addresses to an array of the range of IP addresses", | ||
"main": "index.js", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"scripts": { | ||
"test": "nyc --reporter=html --reporter=text mocha *.test.js", | ||
"jshint": "jshint *.js *.test.js", | ||
"code-style": "jscs -p airbnb --fix *.js *.test.js", | ||
"coverage": "nyc report --reporter=text-lcov | coveralls", | ||
"check-coverage": "nyc check-coverage --statements 100 --functions 100 --lines 100 --branches 100", | ||
"open-coverage": "open coverage/index.html" | ||
"test": "jest --coverage", | ||
"build": "tsc", | ||
"prepare": "npm run build" | ||
}, | ||
"files": [ | ||
"LICENSE", | ||
"README.md", | ||
"index.js" | ||
"index.ts" | ||
], | ||
@@ -37,31 +30,13 @@ "keywords": [ | ||
"devDependencies": { | ||
"chai": "^4.1.2", | ||
"@types/ip": "^1.1.0", | ||
"coveralls": "^3.0.2", | ||
"jscs": "^3.0.7", | ||
"jshint": "^2.10.1", | ||
"mocha": "^5.2.0", | ||
"nyc": "^14.1.1" | ||
"jest": "^26.5.3", | ||
"pre-commit": "^1.2.2", | ||
"ts-jest": "^26.4.1", | ||
"typescript": "^4.0.3" | ||
}, | ||
"pre-commit": [ | ||
"jshint", | ||
"code-style", | ||
"test", | ||
"check-coverage" | ||
"test" | ||
], | ||
"jshintConfig": { | ||
"boss": true, | ||
"node": true, | ||
"strict": false, | ||
"smarttabs": true, | ||
"maxlen": 100, | ||
"newcap": false, | ||
"undef": true, | ||
"unused": true, | ||
"onecase": true, | ||
"indent": 2, | ||
"sub": true, | ||
"esversion": 8 | ||
}, | ||
"dependencies": { | ||
"cidr-regex": "^1.0.7", | ||
"ip": "^1.1.5", | ||
@@ -68,0 +43,0 @@ "ip-address": "^6.1.0" |
@@ -25,3 +25,3 @@ # get-ip-range | ||
* Range `"x.x.x.x-x.x.x.x"` | ||
* Two IPs `"x.x.x.x, x.x.x.x"` | ||
* Two IPs `"x.x.x.x", "x.x.x.x"` | ||
@@ -38,4 +38,4 @@ ### IPv6 | ||
## Usage | ||
```js | ||
const getIPRange = require('get-ip-range'); | ||
```ts | ||
import { getIPRange } from 'get-ip-range'; | ||
@@ -47,14 +47,12 @@ const ipv4CIDR = getIPRange('192.168.1.134/29'); | ||
// All return: | ||
// | ||
// [ | ||
// '192.168.1.128', | ||
// '192.168.1.129', | ||
// '192.168.1.130', | ||
// '192.168.1.131', | ||
// '192.168.1.132', | ||
// '192.168.1.133', | ||
// '192.168.1.134', | ||
// '192.168.1.135', | ||
// ] | ||
// | ||
[ | ||
'192.168.1.128', | ||
'192.168.1.129', | ||
'192.168.1.130', | ||
'192.168.1.131', | ||
'192.168.1.132', | ||
'192.168.1.133', | ||
'192.168.1.134', | ||
'192.168.1.135', | ||
] | ||
@@ -66,10 +64,8 @@ const ipv6CIDR = getIPRange('0:0:0:0:0:ffff:102:304/126'); | ||
// All return: | ||
// | ||
// [ | ||
// '::ffff:102:304', | ||
// '::ffff:102:305', | ||
// '::ffff:102:306', | ||
// '::ffff:102:307', | ||
// ] | ||
// | ||
[ | ||
'::ffff:102:304', | ||
'::ffff:102:305', | ||
'::ffff:102:306', | ||
'::ffff:102:307', | ||
] | ||
``` | ||
@@ -76,0 +72,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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
8833
2
6
157
76
1
- Removedcidr-regex@^1.0.7
- Removedcidr-regex@1.0.7(transitive)