is-cidr
is-cidr copied to clipboard
"strict" option to check IPv4 CIDR network addresses
Hi,
This PR adds the ability to set the CIDR validation as "strict" fulfilling the wish stated in #6.
It adds a new optional boolean parameter named "strict" that defaults to false, thereby not being a breaking change.
It adds a new dependency ipaddr.js for getting the network address from an arbitrary CIDR address.
The current implementation only supports IPv4.
Any feedback is appreciated!