parseIpv4Prefix
parseIpv4Prefix(
text):BitPrefix
Defined in: packages/net-address/src/ipv4/parse-ipv4.ts:186
Parses CIDR notation — a strict dotted quad, /, and a prefix length.
Host bits are kept: 192.168.1.10/24 parses to exactly that. A dotted
netmask in place of the length is not accepted; convert one with
prefixLengthFromMask instead.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Throws
Section titled “Throws”NetAddressSyntaxError When text is not address/length, or the
length is not an integer in [0, 32].