Last active
August 23, 2018 17:54
-
-
Save omarciovsena/8e1e49e337732616fdd873d57df44c1b to your computer and use it in GitHub Desktop.
strip-diacritics
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
// normalize('NFD') => Normalization Form Canonical Decomposition | |
// replace(/[\u0300-\u036f]/g, '') => replaces all characters that are in the range of U+0300 -> U+036F | |
str.normalize('NFD').replace(/[\u0300-\u036f]/g, '') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment