camelize-object-key

Camelize or Decamelize keys of an object

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
camelize-object-key
101.0.46 years ago7 years agoMinified + gzip package size for camelize-object-key in KB

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