Created
July 24, 2015 10:02
-
-
Save JavaScript-Packer/71c10fe7bb51186e1a0e to your computer and use it in GitHub Desktop.
Camelize
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 camelize(e) { | |
| return e.replace(/\W+(.)/g, function(e, t) { | |
| return t.toUpperCase(); | |
| }); | |
| } | |
| function uncamelize(e, t) { | |
| return e.replace(/([a-z\d])([A-Z])/g, "$1" + (t || " ") + "$2"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment