Created
September 21, 2016 10:11
-
-
Save thevangelist/8ff91bac947018c9f3bfaad6487fa149 to your computer and use it in GitHub Desktop.
JS: convert to kebab-case
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 convertToKebabCase = (string) => { | |
return string.replace(/\s+/g, '-').toLowerCase(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@oravecz That's a shame! Do you think you have a fix handy?