Skip to content

Deeply transform object keys to camelCase or snake_case.

Notifications You must be signed in to change notification settings

mits87/transform-keys-deep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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}}

About

Deeply transform object keys to camelCase or snake_case.

Resources

Stars

Watchers

Forks

Packages

No packages published