Last active
May 15, 2022 02:38
-
-
Save russo97/68339038a123eb96521334621532265e to your computer and use it in GitHub Desktop.
Remove special characters from an argument string
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
function normalizeText (text) { | |
return text.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); | |
} | |
// normalizeText('áçí') => aci |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment