Skip to content

Commit 437aa30

Browse files
committed
change docs to typescript format
1 parent a945b64 commit 437aa30

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,23 @@ cidrRegex.v6({exact: true}).test("1:2:3:4:5:6:7:8/64");
2929
```
3030

3131
## API
32-
### cidrRegex([options])
32+
### cidrRegex(options?: CidrRegexOptions)
3333

3434
Returns a regex for matching both IPv4 and IPv6 CIDR IP addresses.
3535

36-
### cidrRegex.v4([options])
36+
### cidrRegex.v4(options?: CidrRegexOptions)
3737

3838
Returns a regex for matching IPv4 CIDR IP addresses.
3939

40-
### cidrRegex.v6([options])
40+
### cidrRegex.v6(options?: CidrRegexOptions)
4141

4242
Returns a regex for matching IPv6 CIDR IP addresses.
4343

44-
#### options.exact
44+
#### CidrRegexOptions
4545

46-
Type: `boolean`<br>
47-
Default: `false` *(Matches any CIDR IP address in a string)*
46+
The options object has the following properties:
4847

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.
5049

5150
## Related
5251

0 commit comments

Comments
 (0)