rss-parser
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -41,3 +41,3 @@ var Entities = require("entities"); | ||
} | ||
entry.categories = item.category; | ||
if (item.category) entry.categories = item.category; | ||
json.feed.entries.push(entry); | ||
@@ -44,0 +44,0 @@ }) |
{ | ||
"name": "rss-parser", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -5,2 +5,3 @@ # rss-parser | ||
### NodeJS | ||
```bash | ||
@@ -10,4 +11,13 @@ npm install --save rss-parser | ||
### Web | ||
```bash | ||
bower install --save rss-parser | ||
``` | ||
## Usage | ||
rss-parser exposes `parseURL()`, `parseString()`, and `parseFile()` functions. | ||
Check out the output format in [test/output/reddit.json](test/output/reddit.json) | ||
### NodeJS | ||
```js | ||
@@ -17,8 +27,21 @@ var parser = require('rss-parser'); | ||
parser.parseURL('https://reddit.com/.rss', function(err, parsed) { | ||
console.log(parsed) | ||
console.log(parsed.feed.title); | ||
parsed.feed.entries.forEach(function(entry) { | ||
console.log(entry.title + ':' + entry.link); | ||
}) | ||
}) | ||
``` | ||
rss-parser also exposes `parseString` and `parseFile` functions. | ||
### Web | ||
```html | ||
<script src="/bower_components/rss-parser/dist/rss-parser.js"></script> | ||
<script> | ||
RSSParser.parseURL('https://reddit.com/.rss', function(err, parsed) { | ||
console.log(parsed.feed.title); | ||
parsed.feed.entries.forEach(function(entry) { | ||
console.log(entry.title + ':' + entry.link); | ||
}) | ||
}) | ||
</script> | ||
``` | ||
Check out the output format in [test/output/reddit.json](test/output/reddit.json) |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
433199
45
0
9968