Created
May 5, 2015 18:13
-
-
Save paulruescher/f59345f56e37973e7be2 to your computer and use it in GitHub Desktop.
lodash mixin for camel casing object keys
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
| _.mixin({ | |
| 'camelCaseKeys' : function(obj) { | |
| return _.object(_.map(_.pairs(obj), function(pair) { | |
| return [_.camelCase(pair[0]), pair[1]]; | |
| })); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment