Convert object keys to camelCase using
camelcase
Install
$ npm install --save camelcase-keys
Usage
const camelcaseKeys = ; ;//=> {fooBar: true} ;//=> {fooBar: true, nested: {unicornRainbow: true}}
const camelcaseKeys = ; const argv = processargv;//=> {_: [], 'foo-bar': true} ;//=> {_: [], fooBar: true}
API
camelcaseKeys(input, [options])
input
Type: Object
Object to camelCase.
options
Type: Object
exclude
Type: string[]
RegExp[]
Default: []
Exclude keys from being camelCased.
deep
Type: boolean
Default: false
Recurse nested objects and objects in arrays.
License
MIT © Sindre Sorhus