Created
May 16, 2019 12:32
-
-
Save AmrAbdulrahman/a4b9fce05abfc147dff963e5f6c8674e to your computer and use it in GitHub Desktop.
Convert camelCase to space separated words
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
'camelCaseStyle' | |
.split(/([a-z][A-Z])/g) | |
.reduce((words, group, index) => (index % 2 ? `${words}${group[0]} ${group[1]}` : `${words}${group}`), '') |
abumostafa
commented
May 16, 2019
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment