Last active
April 18, 2020 14:24
-
-
Save paitonic/4bc06539207e67250db2f3bdfb522677 to your computer and use it in GitHub Desktop.
to camel case
This file contains hidden or 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
toCamelCase = (value) => value.toLowerCase().replace(/\s\w/, (match) => match.slice(1).toUpperCase()); | |
// 'Blue Grey' -> 'blueGrey' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment