Skip to content

Instantly share code, notes, and snippets.

@wallace7souza
Last active August 15, 2020 21:10
Show Gist options
  • Save wallace7souza/4c1fc39e52e443152b18f5f059ab3aad to your computer and use it in GitHub Desktop.
Save wallace7souza/4c1fc39e52e443152b18f5f059ab3aad to your computer and use it in GitHub Desktop.
Essa função substitui caracteres acentuados por sua versão sem acento.
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