Created
July 8, 2019 06:59
-
-
Save slashbinslashnoname/4312e406fbbde613ff91ce465517a539 to your computer and use it in GitHub Desktop.
Locale Compare with JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array.sort((item, nextItem) => | |
item.label.localeCompare(nextItem.label, "fr", { | |
sensitivity: "base", | |
numeric: "true" | |
}) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bad indent, don't care for this