File tree 1 file changed +19
-19
lines changed
1 file changed +19
-19
lines changed Original file line number Diff line number Diff line change 3
3
[ ![ Build Status] ( https://travis-ci.org/export-mike/camelcase-keys-recursive.svg )] ( https://travis-ci.org/export-mike/camelcase-keys-recursive )
4
4
5
5
### Simple usage:
6
+ ``` JavaScript
7
+ var camelGotHumps = camelCaseRecursive ({' test-1' : 123 , ' test-2' : {' test-3:' : {' test-four' : 132 }}});
6
8
7
- var camelGotHumps = camelCaseRecursive({'test-1':123, 'test-2':{'test-3:':{'test-four':132}}});
8
-
9
- //{ test1: 123, test2: { 'test3:': { testFour: 132 } } }
10
- console.log(camelGotHumps);
11
-
9
+ // { test1: 123, test2: { 'test3:': { testFour: 132 } } }
10
+ console .log (camelGotHumps);
11
+ ```
12
12
### Works with Arrays too:
13
-
14
- var anotherCamelWithTheHump = camelCaseRecursive({
15
- 'test-1': 123,
16
- 'test-Two': [{
17
- 'test-three': {
18
- 'test-FOUR': [{'test-five':[{testSix:{'test-seven':8}}]}]
19
- }
20
- }]
21
- });
22
-
23
- //{"test1":123,"testTwo":[{"testThree":{"testFOUR":[{"testFive":[{"testSix":{"testSeven":8}}]}]}}]}console.log(
24
- JSON.stringify(anotherCamelWithTheHump));
25
-
13
+ ``` JavaScript
14
+ var anotherCamelWithTheHump = camelCaseRecursive ({
15
+ ' test-1' : 123 ,
16
+ ' test-Two' : [{
17
+ ' test-three' : {
18
+ ' test-FOUR' : [{' test-five' : [{testSix: {' test-seven' : 8 }}]}]
19
+ }
20
+ }]
21
+ });
22
+
23
+ // {"test1":123,"testTwo":[{"testThree":{"testFOUR":[{"testFive":[{"testSix":{"testSeven":8}}]}]}}]}console.log(
24
+ JSON .stringify (anotherCamelWithTheHump));
25
+ ```
26
26
### More information on internal modules
27
27
[ map-obj] ( https://www.npmjs.com/package/map-obj )
28
28
29
29
### Contributing
30
- Simply make a pr with details on your bug and tests.
30
+ Simply make a pr with details on your bug and tests.
You can’t perform that action at this time.
0 commit comments