paramcase-keys
Convert object keys to paramCase using
param-case
Install
$ npm install paramcase-keys
Usage
const paramcaseKeys = // Convert an object//=> { "foo-bar": true } // Convert an array of objects//=> [{ "foo-bar": true }, { "bar-foo": false }] //=> { "foo-bar": true, nested: { "unicorn-rainbow": true } }
API
paramcaseKeys(input, [options])
input
Type: Object
Object[]
Object or array of objects to paramCase.
options
Type: Object
exclude
Type: Array<string|RegExp>
Default: []
Exclude keys from being paramCased.
deep
Type: boolean
Default: false
Recurse nested objects and objects in arrays.
Related
License
MIT