Created
May 14, 2019 14:41
-
-
Save tcelestino/d01330151a123bb923c5410756e51146 to your computer and use it in GitHub Desktop.
remove accents, switch white-space from hifen and transform string in lowercase
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
const sanitize = str => str.normalize('NFD').replace(/[\u0300-\u036f]/g, '').replace(' ', '-').toLowerCase(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment