@metreeca/core - v0.13.0
    Preparing search index...

    Function compound

    • Combines multiple comparators into a single comparator.

      Values are ordered by the first comparator, and ties are broken by the following ones in priority order. Values tied under every comparator are equivalent, and so are all values if no comparator is provided.

      Type Parameters

      • V

        The type of values to compare

      Parameters

      • ...comparators: readonly Comparator<V>[]

        Comparators to apply, from highest to lowest priority

      Returns Comparator<V>

      A comparator ordering values by the first comparator that tells them apart