sort-es icon indicating copy to clipboard operation
sort-es copied to clipboard

byString depends on locale

Open johnw42 opened this issue 1 year ago • 0 comments

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.

johnw42 avatar Oct 09 '23 19:10 johnw42