Skip to content

Instantly share code, notes, and snippets.

@paulruescher
Created May 5, 2015 18:13
Show Gist options
  • Select an option

  • Save paulruescher/f59345f56e37973e7be2 to your computer and use it in GitHub Desktop.

Select an option

Save paulruescher/f59345f56e37973e7be2 to your computer and use it in GitHub Desktop.
lodash mixin for camel casing object keys
_.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