Skip to content

Commit c418d03

Browse files
committed
add customFields docs
1 parent 0ee486e commit c418d03

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ parser.parseURL('https://reddit.com/.rss', {maxRedirects: 3}, function(err, pars
5858
```
5959

6060
### Custom Fields
61+
If your RSS feed contains fields that aren't currently returned, you can access them using the `customFields` option.
62+
6163
```js
6264
var options = {
6365
customFields: {
@@ -74,6 +76,18 @@ parser.parseURL('https://www.reddit.com/.rss', options, function(err, parsed) {
7476
})
7577
```
7678

79+
To rename fields, you can pass in an array with two items, in the format `[fromField, toField]`:
80+
81+
```js
82+
var options = {
83+
customFields: {
84+
item: [
85+
['dc:coAuthor', 'coAuthor'],
86+
]
87+
}
88+
}
89+
```
90+
7791
## Contributing
7892
Contributions welcome!
7993

0 commit comments

Comments
 (0)