Compares two values by their size property. Puts the value with the smaller size first.
size
[new Set([0, 1, 2]), new Set([0]), new Set([0, 1])].sort(bySize) == [new Set([0]), new Set([0, 1]), new Set([0, 1, 2])];
first value
second value
Generated using TypeDoc
Compares two values by their
size
property. Puts the value with the smaller size first.Example