.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / decamelize-keys / readme.md
1 # decamelize-keys [![Build Status](https://travis-ci.org/dsblv/decamelize-keys.svg?branch=master)](https://travis-ci.org/dsblv/decamelize-keys)
2
3 > Convert object keys from camelCase to lowercase with a custom separator using [`decamelize`](https://github.com/sindresorhus/decamelize)
4
5 *This project was forked from [`camelcase-keys`](https://github.com/sindresorhus/camelcase-keys) and converted to do the opposite*
6
7
8 ## Install
9
10 ```sh
11 $ npm install --save decamelize-keys
12 ```
13
14
15 ## Usage
16
17 ```js
18 const decamelizeKeys = require('decamelize-keys');
19
20 decamelizeKeys({fooBar: true}, '-');
21 //=> {'foo-bar': true}
22 ```
23
24
25 ## API
26
27 ### decamelizeKeys(input, [separator], [options])
28
29 ### input
30
31 Type: `object`  
32 *Required*
33
34 Object to decamelize.
35
36 ### separator
37
38 Type: `string`  
39 Default: `_`
40
41 A string to insert between words.
42
43 ### options
44
45 Type: `object`
46
47 #### separator
48
49 Type: `string`  
50 Default: `_`
51
52 Alternative way to specify [separator](#separator).
53
54 #### exclude
55
56 Type: `array`  
57 Default: `[]`
58
59 Exclude keys from being decamelized.
60
61
62 ## Related
63
64 See [`camelcase-keys`](https://github.com/sindresorhus/camelcase-keys) for the inverse.
65
66
67 ## License
68
69 MIT © [Sindre Sorhus](http://sindresorhus.com), [Dmirty Sobolev](https://github.com/dsblv)