Checks whether x is a comparable type and returns the result of x.compare(y). Otherwise the return value of the compare function is equivalent to obj === other ? 0 : obj < other ? -1 : 1
x
x.compare(y)
obj === other ? 0 : obj < other ? -1 : 1
The comparison result
An initial value
Other value to compare
Generated using TypeDoc
Checks whether
x
is a comparable type and returns the result ofx.compare(y)
. Otherwise the return value of the compare function is equivalent toobj === other ? 0 : obj < other ? -1 : 1
Returns
The comparison result
See