Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit ef331c4

Browse files
committed
Update README.md
1 parent 941f325 commit ef331c4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $ npm install xml2json
1414
```
1515

1616
## Usage
17-
```
17+
```javascript
1818
var parser = require('xml2json');
1919

2020
var xml = "<foo>bar</foo>";
@@ -23,16 +23,16 @@ console.log(json);
2323
```
2424
## API
2525

26-
```
26+
```javascript
2727
parser.toJson(xml, options);
2828
```
29-
```
29+
```javascript
3030
parser.toXml(json, options);
3131
```
3232

3333
### Options object
3434

35-
```
35+
```javascript
3636
var options = {
3737
object: false,
3838
reversible: false,
@@ -47,7 +47,7 @@ var options = {
4747
* **trim:** Removes leading and trailing whitespaces as well as line terminators in element values.
4848
* **sanitize:** Sanitizes the following characters:
4949

50-
```
50+
```javascript
5151
var chars = { '<': '&lt;',
5252
'>': '&gt;',
5353
'(': '&#40;',

0 commit comments

Comments
 (0)