Sha256: fcc5bc113b7cc4537df507dd64477fe7322b1d2d2640c751f6a97aae5ca6ee5b

Contents?: true

Size: 1.21 KB

Versions: 24

Compression:

Stored size: 1.21 KB

Contents

# decamelize-keys [![Build Status](https://travis-ci.org/dsblv/decamelize-keys.svg?branch=master)](https://travis-ci.org/dsblv/decamelize-keys)

> Convert object keys from camelCase to lowercase with a custom separator using [`decamelize`](https://github.com/sindresorhus/decamelize)

*This project was forked from [`camelcase-keys`](https://github.com/sindresorhus/camelcase-keys) and converted to do the opposite*


## Install

```sh
$ npm install --save decamelize-keys
```


## Usage

```js
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](#separator).

#### exclude

Type: `array`  
Default: `[]`

Exclude keys from being decamelized.


## Related

See [`camelcase-keys`](https://github.com/sindresorhus/camelcase-keys) for the inverse.


## License

MIT © [Sindre Sorhus](http://sindresorhus.com), [Dmirty Sobolev](https://github.com/dsblv)

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/decamelize-keys/readme.md
trusty-cms-5.0.7 node_modules/decamelize-keys/readme.md
trusty-cms-5.0.6 node_modules/decamelize-keys/readme.md
trusty-cms-5.0.5 node_modules/decamelize-keys/readme.md
trusty-cms-5.0.4 node_modules/decamelize-keys/readme.md
trusty-cms-5.0.3 node_modules/decamelize-keys/readme.md
trusty-cms-5.0.2 node_modules/decamelize-keys/readme.md
trusty-cms-5.0.1 node_modules/decamelize-keys/readme.md
trusty-cms-4.3.5 node_modules/decamelize-keys/readme.md
trusty-cms-5.0.0 node_modules/decamelize-keys/readme.md
trusty-cms-4.3.4 node_modules/decamelize-keys/readme.md
trusty-cms-4.3.3 node_modules/decamelize-keys/readme.md
trusty-cms-4.3.2 node_modules/decamelize-keys/readme.md
trusty-cms-4.3.1 node_modules/decamelize-keys/readme.md
trusty-cms-4.3 node_modules/decamelize-keys/readme.md
trusty-cms-4.2.3 node_modules/decamelize-keys/readme.md
trusty-cms-4.2.2 node_modules/decamelize-keys/readme.md
trusty-cms-4.2.1 node_modules/decamelize-keys/readme.md
trusty-cms-4.2 node_modules/decamelize-keys/readme.md
trusty-cms-4.1.9 node_modules/decamelize-keys/readme.md