File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -29,24 +29,23 @@ cidrRegex.v6({exact: true}).test("1:2:3:4:5:6:7:8/64");
29
29
```
30
30
31
31
## API
32
- ### cidrRegex([ options] )
32
+ ### cidrRegex(options?: CidrRegexOptions )
33
33
34
34
Returns a regex for matching both IPv4 and IPv6 CIDR IP addresses.
35
35
36
- ### cidrRegex.v4([ options] )
36
+ ### cidrRegex.v4(options?: CidrRegexOptions )
37
37
38
38
Returns a regex for matching IPv4 CIDR IP addresses.
39
39
40
- ### cidrRegex.v6([ options] )
40
+ ### cidrRegex.v6(options?: CidrRegexOptions )
41
41
42
42
Returns a regex for matching IPv6 CIDR IP addresses.
43
43
44
- #### options.exact
44
+ #### CidrRegexOptions
45
45
46
- Type: ` boolean ` <br >
47
- Default: ` false ` * (Matches any CIDR IP address in a string)*
46
+ The options object has the following properties:
48
47
49
- Only match an exact string. Useful with ` RegExp#test() ` to check if a string is a CIDR IP address.
48
+ - ` exact ` * boolean * : Only match an exact string. Useful with ` RegExp#test() ` to check if a string is a CIDR IP address. Default: false .
50
49
51
50
## Related
52
51
You can’t perform that action at this time.
0 commit comments