Skip to content

Instantly share code, notes, and snippets.

@kubadlo
Created June 12, 2020 09:53
Show Gist options
  • Save kubadlo/ef5ef48000ccfc2b7a43bbb05fece03d to your computer and use it in GitHub Desktop.
Save kubadlo/ef5ef48000ccfc2b7a43bbb05fece03d to your computer and use it in GitHub Desktop.
Remove accents/diacritics in a string in JavaScript
const str = "ščíáýžľčéíľšéíľéšíťč";
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