compareBitAddresses
compareBitAddresses(
a,b):ComparatorResult
Defined in: packages/net-address/src/prefix/compare.ts:14
Orders two addresses exactly, narrower widths first and then by unsigned big-endian value.
Mixed widths are ordered rather than rejected so that a heterogeneous collection still sorts; within one width the order is the numeric one. Exact, as every comparator in this tree is — there is no tolerance to apply to a bit string. O(1).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”ComparatorResult