Skip to content

Commit a43a557

Browse files
author
Ubuntu
committed
update readme
1 parent 055f910 commit a43a557

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,38 @@
22

33
## Installation
44

5+
### NodeJS
56
```bash
67
npm install --save rss-parser
78
```
89

10+
### Web
11+
```bash
12+
bower install --save rss-parser
13+
```
14+
915
## Usage
1016

17+
### NodeJS
1118
```js
1219
var parser = require('rss-parser');
1320

1421
parser.parseURL('https://reddit.com/.rss', function(err, parsed) {
15-
console.log(parsed)
22+
console.log(parsed.feed.title);
23+
parsed.feed.entries.forEach(function(entry) {
24+
console.log(entry.title + ':' + entry.link);
25+
})
26+
})
27+
```
28+
29+
### Web
30+
```html
31+
<script src="/bower_components/rss-parser/dist/rss-parser.js"></script>
32+
RSSParser.parseURL('https://reddit.com/.rss', function(err, parsed) {
33+
console.log(parsed.feed.title);
34+
parsed.feed.entries.forEach(function(entry) {
35+
console.log(entry.title + ':' + entry.link);
36+
})
1637
})
1738
```
1839

0 commit comments

Comments
 (0)