Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save slashbinslashnoname/4312e406fbbde613ff91ce465517a539 to your computer and use it in GitHub Desktop.
Save slashbinslashnoname/4312e406fbbde613ff91ce465517a539 to your computer and use it in GitHub Desktop.
Locale Compare with JS
array.sort((item, nextItem) =>
item.label.localeCompare(nextItem.label, "fr", {
sensitivity: "base",
numeric: "true"
})
);
@slashbinslashnoname
Copy link
Author

Bad indent, don't care for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment