Skip to content

Instantly share code, notes, and snippets.

@oneeyedman
Created January 26, 2022 16:08
Show Gist options
  • Save oneeyedman/5a97f68d12d0884d8aad9dc6377e3d02 to your computer and use it in GitHub Desktop.
Save oneeyedman/5a97f68d12d0884d8aad9dc6377e3d02 to your computer and use it in GitHub Desktop.
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