Created
January 26, 2022 16:08
-
-
Save oneeyedman/5a97f68d12d0884d8aad9dc6377e3d02 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
function cleanAccented(value) { | |
return value | |
.toLowerCase() | |
.trim() | |
.normalize("NFD") | |
.replace(/\p{Diacritic}/gu, "") | |
.replaceAll(' ', '_'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment