cidr-regex 2.0.4 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +10 -6
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# cidr-regex
|
|
2
|
-
> Regular expression for matching IP addresses in CIDR notation
|
|
3
|
-
|
|
4
2
|
[](https://www.npmjs.org/package/cidr-regex) [](https://www.npmjs.org/package/cidr-regex) [](https://travis-ci.org/silverwind/cidr-regex)
|
|
5
3
|
|
|
4
|
+
> Regular expression for matching IP addresses in CIDR notation
|
|
5
|
+
|
|
6
6
|
## Install
|
|
7
7
|
|
|
8
8
|
```sh
|
|
@@ -26,7 +26,7 @@ cidrRegex.v6({exact: true}).test('1:2:3:4:5:6:7:8/64');
|
|
|
26
26
|
//=> true
|
|
27
27
|
|
|
28
28
|
'foo 192.168.0.1/24 bar 1:2:3:4:5:6:7:8/64 baz'.match(cidrRegex());
|
|
29
|
-
//=> ['192.168.0.1', '1:2:3:4:5:6:7:8']
|
|
29
|
+
//=> ['192.168.0.1/24', '1:2:3:4:5:6:7:8/64']
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## API
|
|
@@ -53,7 +53,7 @@ Only match an exact string. Useful with `RegExp#test()` to check if a string is
|
|
|
53
53
|
|
|
54
54
|
## Related
|
|
55
55
|
|
|
56
|
-
- [is-cidr](https://github.com/silverwind/is-cidr) - Check if a string is
|
|
56
|
+
- [is-cidr](https://github.com/silverwind/is-cidr) - Check if a string is an IP address in CIDR notation
|
|
57
57
|
- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address
|
|
58
58
|
- [ip-regex](https://github.com/sindresorhus/ip-regex) - Regular expression for matching IP addresses
|
|
59
59
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cidr-regex",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Regular expression for matching IP addresses in CIDR notation",
|
|
5
5
|
"author": "silverwind <me@silverwind.io>",
|
|
6
6
|
"contributors": [
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
"scripts": {
|
|
12
12
|
"test": "make test"
|
|
13
13
|
},
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=4"
|
|
16
|
+
},
|
|
14
17
|
"files": [
|
|
15
18
|
"index.js"
|
|
16
19
|
],
|
|
@@ -24,12 +27,13 @@
|
|
|
24
27
|
"ip",
|
|
25
28
|
"ip address"
|
|
26
29
|
],
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"ava": "^0.24.0",
|
|
29
|
-
"eslint": "^4.13.0",
|
|
30
|
-
"updates": "^2.0.3"
|
|
31
|
-
},
|
|
32
30
|
"dependencies": {
|
|
33
31
|
"ip-regex": "^2.1.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"ava": "^0.25.0",
|
|
35
|
+
"eslint": "^4.18.2",
|
|
36
|
+
"eslint-config-silverwind": "^1.0.37",
|
|
37
|
+
"updates": "^2.3.1"
|
|
34
38
|
}
|
|
35
39
|
}
|