Skip to content

Instantly share code, notes, and snippets.

@tohagan
Created March 3, 2023 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tohagan/2b3cd587a19e37046fbc7881272c108c to your computer and use it in GitHub Desktop.
Save tohagan/2b3cd587a19e37046fbc7881272c108c to your computer and use it in GitHub Desktop.
Convert diacritic / accented letters to non-accented (for search, code etc)
const removeAccents = (name) => name.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment