conventional-changelog-action/node_modules/decamelize-keys
Conventional Changelog Action bf7e9cbfcd chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
..
node_modules/map-obj chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
index.js chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
license chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
package.json chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
readme.md chore(release): v3.1.1 2020-07-13 17:58:28 +00:00

readme.md

decamelize-keys Build Status

Convert object keys from camelCase to lowercase with a custom separator using decamelize

This project was forked from camelcase-keys and converted to do the opposite

Install

$ npm install --save decamelize-keys

Usage

const decamelizeKeys = require('decamelize-keys');

decamelizeKeys({fooBar: true}, '-');
//=> {'foo-bar': true}

API

decamelizeKeys(input, [separator], [options])

input

Type: object
Required

Object to decamelize.

separator

Type: string
Default: _

A string to insert between words.

options

Type: object

separator

Type: string
Default: _

Alternative way to specify separator.

exclude

Type: array
Default: []

Exclude keys from being decamelized.

See camelcase-keys for the inverse.

License

MIT © Sindre Sorhus, Dmirty Sobolev