Sort an array of Item progressively by sort.
Item
sort
Sorts items progresively by the elements of sortOrder, passing to the next element if values at the current element are equal.
items
sortOrder
Comparisons are made as expected for number, string, and bigint types.
number
string
bigint
null and undefined values are considered equivalent and less than any other value.
null
undefined
Other types are compared by truthiness, where truthy is greater than falsy.
Item type. Must extend Entity.
Entity
Array of Item.
SortOrder array.
SortOrder
Sorted items.
Sort an array of
Item
progressively bysort
.Remarks
Sorts
items
progresively by the elements ofsortOrder
, passing to the next element if values at the current element are equal.Comparisons are made as expected for
number
,string
, andbigint
types.null
andundefined
values are considered equivalent and less than any other value.Other types are compared by truthiness, where truthy is greater than falsy.