Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rss-parser

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rss-parser - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc