decamelize-keys-deep

0.1.1 • Public • Published

decamelize-keys-deep

Deeply convert the camelized keys of an object into a lowercased one with a custom separator
Example: {unicornRainbow: {fooBar: 1}}{unicorn_rainbow: {foo_bar: 1}}

Install

$ npm install --save decamelize-keys-deep

Usage

const decamelizeKeysDeep = require('decamelize-keys-deep');
 
decamelizeKeysDeep({unicornRainbow: {fooBar: 1}});
//=> {unicorn_rainbow: {foo_bar: 1}}
 
decamelizeKeysDeep({unicornRainbow: {fooBar: 1}}, '-');
//=> {unicorn-rainbow: {foo-bar: 1}}

API

decamelizeKeysDeep(input, [separator])

input

Type: object

separator

Type: string
Default: _

Related

See camelcase-keys-deep for the inverse.

License

MIT © Rafael Xavier de Souza

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    13,403
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    13,403
  • 0.1.0
    104
  • 0.0.3
    2
  • 0.0.2
    2
  • 0.0.1
    3

Package Sidebar

Install

npm i decamelize-keys-deep

Weekly Downloads

6,576

Version

0.1.1

License

MIT

Last publish

Collaborators

  • rxaviers