composeSortDescriptors
Converts the SortDescriptors
into a Comparer
function that can be used through Array.sort
. If multiple descriptors are provided, sorting is applied in a right-to-left order.
Parameters
descriptors SortDescriptor[]
The descriptors which will be converted.
Returns
Comparer - The produced function.