• Natural order a collection You can define identifiers as callback functions, that get the element and return the value to sort.

    Type Parameters

    • T

    Parameters

    • collection: readonly T[]

      The collection to order

    • Optionalidentifiers: IdentifierFn<T>[]

      An array of identifiers to use, by default the identity of the element is used

    • Optionalorders: SortingOrder[]

      Array of orders, by default all identifiers are sorted ascening

    Returns T[]