Created
April 22, 2011 13:24
-
-
Save umbrae/936650 to your computer and use it in GitHub Desktop.
Convert from Dash Case (some-string-like-this) to lowerCamelCase in Javascript
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
| function dashCaseToLowerCamelCase(dashCaseString) { | |
| return dashCaseString.replace(/-\w/g, function ($0) { return $0.substr(-1).toUpperCase(); }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment