sort-es
sort-es copied to clipboard
byString depends on locale
IMHO byString
should use JavaScript's relational operators rather than a locale-sensitive comparison to avoid surprises where different users see different sort orders. Using a locale-sensitive comparison should be something users can opt into via the options parameter.
I propose adding a "locale" option, where true means to use the current locale, a falsy value means to use the <
operator, and a nonempty string means to use a specific locale. As this would be a potentially breaking change for some users, the project's major version number should be increased.