Last active
November 7, 2016 09:15
-
-
Save malko/a1b1976eec07142f555ca8ae74010e1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* source: http://stackoverflow.com/a/37511463/646056 | |
*/ | |
function removeDiacritics(s) { | |
return s.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it just have wonderful perfs https://jsperf.com/normalizeremovediacretics3