Update .bashrc
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / node_modules / camelcase-keys / readme.md
1 # camelcase-keys [![Build Status](https://travis-ci.org/sindresorhus/camelcase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase-keys)
2
3 > Convert object keys to camelCase using [`camelcase`](https://github.com/sindresorhus/camelcase)
4
5
6 ## Install
7
8 ```
9 $ npm install --save camelcase-keys
10 ```
11
12
13 ## Usage
14
15 ```js
16 const camelcaseKeys = require('camelcase-keys');
17
18 // Convert an object
19 camelcaseKeys({'foo-bar': true});
20 //=> {fooBar: true}
21
22 // Convert an array of objects
23 camelcaseKeys([{'foo-bar': true}, {'bar-foo': false}]);
24 //=> [{fooBar: true}, {barFoo: false}]
25
26 camelcaseKeys({'foo-bar': true, nested: {unicorn_rainbow: true}}, {deep: true});
27 //=> {fooBar: true, nested: {unicornRainbow: true}}
28 ```
29
30 ```js
31 const camelcaseKeys = require('camelcase-keys');
32
33 const argv = require('minimist')(process.argv.slice(2));
34 //=> {_: [], 'foo-bar': true}
35
36 camelcaseKeys(argv);
37 //=> {_: [], fooBar: true}
38 ```
39
40
41 ## API
42
43 ### camelcaseKeys(input, [options])
44
45 #### input
46
47 Type: `Object` `Object[]`
48
49 Object or array of objects to camelCase.
50
51 #### options
52
53 Type: `Object`
54
55 ##### exclude
56
57 Type: `string[]` `RegExp[]`<br>
58 Default: `[]`
59
60 Exclude keys from being camelCased.
61
62 ##### deep
63
64 Type: `boolean`<br>
65 Default: `false`
66
67 Recurse nested objects and objects in arrays.
68
69
70 ## License
71
72 MIT © [Sindre Sorhus](https://sindresorhus.com)