camelize-object-key
v1.0.4
Published
Camelize or Decamelize keys of an object
Downloads
89
Readme
camelizeObject
Turn object keys into camelCased or decamelize them with a given separator
Installation
$ npm install --save camelize-object-key
API
camelize(object)
camelizeObjectKey.camelize({ "id": 1, "first_name": "Matteo" });
// > { "id": 1, "firstName": "Matteo" }
decamelize(object, separator = "_")
camelizeObjectKey.decamelize({ "id": 1, "firstName": "Matteo" });
// > { "id": 1, "firstName": "Matteo" }
License
MIT