• Returns a comparator that sorts strings alphabetically using localeCompare. The collator includes many options to sort numerically, to ignore the case, to ignore accents, etc…

    Parameters

    • locale: string

      The locale of the strings

    • direction: SortDirection = SortDirection.ASC

      The sort direction

    • Optional options: Omit<CollatorOptions, "usage">

      collator options

    Returns Comparator<string>