Last active
August 29, 2015 14:08
-
-
Save rpbaltazar/c8b7d9cc3e4618143d2e to your computer and use it in GitHub Desktop.
<irony>Awesome nail to camel case a string</irony>
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
toCamelCase= (str) -> | |
val = _.map(str.split("_"), (x) -> | |
x[0].toUpperCase() + x.substr(1,1000) | |
).join("") | |
val[0].toLowerCase() + val.substr(1,1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment