Skip to content

Instantly share code, notes, and snippets.

@miroswd
Created September 8, 2021 19:38
Show Gist options
  • Save miroswd/51fe67963dce81b2493afa6d04d49a45 to your computer and use it in GitHub Desktop.
Save miroswd/51fe67963dce81b2493afa6d04d49a45 to your computer and use it in GitHub Desktop.
Como remover os acentos de uma string || remove accents js || create a slug using js
// Remove accents and spaces from a string
'rEFerêncIA PAra EDIÇãO de SLUG'.toLowerCase().replaceAll(/ /g,'-').normalize("NFD").replace(/[\u0300-\u036f]/g, "")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment