Skip to content

Commit 13ad4d0

Browse files
authored
Update README.md
1 parent 2772a29 commit 13ad4d0

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33
[![Build Status](https://travis-ci.org/export-mike/camelcase-keys-recursive.svg)](https://travis-ci.org/export-mike/camelcase-keys-recursive)
44

55
### Simple usage:
6+
``` JavaScript
7+
var camelGotHumps = camelCaseRecursive({'test-1':123, 'test-2':{'test-3:':{'test-four':132}}});
68

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+
```
1212
### 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+
```
2626
### More information on internal modules
2727
[map-obj](https://www.npmjs.com/package/map-obj)
2828

2929
### 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.

0 commit comments

Comments
 (0)