Skip to content

subtractBitPrefixes

subtractBitPrefixes(a, b): BitPrefix[]

Defined in: packages/net-address/src/prefix/set-ops.ts:75

Every address in a but not in b, as the shortest prefix list.

This is how a firewall carves an exception out of an allowlist, so the result is exact: no address of b survives, and none of a is lost. O((n + m) log (n + m)).

Iterable<BitPrefix>

Iterable<BitPrefix>

BitPrefix[]

RangeError When the two collections mix address widths.