compare
compare(
a,b):number
Defined in: src/uuid/codec.ts:172
Byte-order comparison, which is also chronological order for the time-ordered versions 6 and 7.
Returns a number suitable for Array.prototype.sort.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”number
Example
Section titled “Example”[v7(), v7(), v7()].sort(compare); // oldest first
compare(NIL, MAX); // -1compare(NIL, NIL); // 0