Function: defaultCompare()
defaultCompare<
ElementType
>(x
:ElementType
,y
:ElementType
):LexicographicComparison
Compares two elements lexicographically using the default comparison algorithm.
Type Parameters
Type Parameter |
---|
ElementType |
Parameters
Parameter | Type | Description |
---|---|---|
x | ElementType | The first element to compare. |
y | ElementType | The second element to compare. |
Returns
The lexicographic comparison of the two elements.
Seealso
23.1.3.30.2 CompareArrayElements (https://tc39.es/ecma262/#sec-comparearrayelements)
Remarks
This function is used as the comparison algorithm for compareBy.
Defined in
projects/utilities/packages/iterator-utilities/src/lib/shared/comparators.ts:19