splitBitPrefix
splitBitPrefix(
prefix,subnetPrefixLength):BitPrefix[]
Defined in: packages/net-address/src/prefix/aggregate.ts:51
Divides a prefix into every subnet of subnetPrefixLength.
Allocates 2 ** (subnetPrefixLength - prefix.prefixLength) entries, so the
cost is exponential in the difference and the caller chooses it.
Parameters
Section titled “Parameters”prefix
Section titled “prefix”subnetPrefixLength
Section titled “subnetPrefixLength”number
Returns
Section titled “Returns”Throws
Section titled “Throws”RangeError When subnetPrefixLength is not between the prefix’s own
length and its bit width, or when the subnet count exceeds what an array
can hold.