Skip to content

prefixLengthFromMask

prefixLengthFromMask(mask): number

Defined in: packages/net-address/src/prefix/mask.ts:71

How many leading ones a netmask has.

BitAddress

number

RangeError When the mask is not contiguous — 255.0.255.0 names no prefix length, and rounding it to one would silently widen an ACL.