Skip to content

Instantly share code, notes, and snippets.

@omarciovsena
Last active August 23, 2018 17:54
Show Gist options
  • Save omarciovsena/8e1e49e337732616fdd873d57df44c1b to your computer and use it in GitHub Desktop.
Save omarciovsena/8e1e49e337732616fdd873d57df44c1b to your computer and use it in GitHub Desktop.
strip-diacritics
// normalize('NFD') => Normalization Form Canonical Decomposition
// replace(/[\u0300-\u036f]/g, '') => replaces all characters that are in the range of U+0300 -> U+036F
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