transform-keys-deep
v0.0.5
Published
Deeply convert the keys of an object to camelCase
Downloads
52
Maintainers
Readme
transform-keys-deep
Deeply convert object keys from snakecase to camelcase and and other way around Example:
{unicornRainbow: {fooBar: 1}}
→{unicorn_rainbow: {foo_bar: 1}}
Install
$ npm install --save transform-keys-deep
Usage
const { camelcaseKeysDeep, snakecaseKeysDeep } = require('transform-keys-deep');
snakecaseKeysDeep({unicornRainbow: {fooBar: 1}});
//=> {unicorn_rainbow: {foo_bar: 1}}
camelcaseKeysDeep({unicorn_rainbow: {foo_bar: 1}});
//=> {unicornRainbow: {fooBar: 1}}