Socket
Socket
Sign inDemoInstall

rss-parser

Package Overview
Dependencies
4
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rss-parser

A simple, light-weight RSS parser. Parse strings, URLs, or files and get a JS object back


Version published
Weekly downloads
284K
decreased by-0.49%
Maintainers
1
Install size
1.36 MB
Created
Weekly downloads
 

Readme

Source

rss-parser

Installation

NodeJS

npm install --save rss-parser

Web

bower install --save rss-parser

Usage

rss-parser exposes parseURL(), parseString(), and parseFile() functions.

Check out the output format in test/output/reddit.json

NodeJS

var parser = require('rss-parser');

parser.parseURL('https://www.reddit.com/.rss', function(err, parsed) {
  console.log(parsed.feed.title);
  parsed.feed.entries.forEach(function(entry) {
    console.log(entry.title + ':' + entry.link);
  })
})

Web

<script src="/bower_components/rss-parser/dist/rss-parser.js"></script>
<script>
RSSParser.parseURL('https://www.reddit.com/.rss', function(err, parsed) {
  console.log(parsed.feed.title);
  parsed.feed.entries.forEach(function(entry) {
    console.log(entry.title + ':' + entry.link);
  })
})
</script>

Contributing

Running Tests

The tests run the RSS parser for several sample RSS feeds in test/input and outputs the resulting JSON into test/output. If there are any changes to the output files the tests will fail.

To check if your changes affect the output of any test cases, run

npm test

To update the output files with your changes, run

WRITE_GOLDEN=true npm test

Publishing Releases

grunt browserify
git commit -a -m "browserify"
npm version minor # or major/patch
npm publish
git push --follow-tags

Keywords

FAQs

Last updated on 27 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc