Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

decamelize-keys-deep

rxaviers16.7kMIT0.1.1

Deeply convert the camelized keys of an object into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow

map, obj, object, key, keys, value, values, val, decamelize, decamelcase, camelcase, case, dash, hyphen, dot, underscore, separator, string, text, convert, deep, recursive

readme

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: _

See camelcase-keys-deep for the inverse.

License

MIT © Rafael Xavier de Souza