Skip to content

Instantly share code, notes, and snippets.

@russo97
Last active May 15, 2022 02:38
Show Gist options
  • Save russo97/68339038a123eb96521334621532265e to your computer and use it in GitHub Desktop.
Save russo97/68339038a123eb96521334621532265e to your computer and use it in GitHub Desktop.
Remove special characters from an argument string
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