Last active
August 15, 2020 21:10
-
-
Save wallace7souza/4c1fc39e52e443152b18f5f059ab3aad to your computer and use it in GitHub Desktop.
Essa função substitui caracteres acentuados por sua versão sem acento.
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 replaceSpecialChars(str=''){ | |
return 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