camelize-object-key

1.0.4 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i camelize-object-key

Weekly Downloads

32

Version

1.0.4

License

MIT

Last publish

Collaborators

  • matteo-harpoon