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

react-native-rss-parser

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-rss-parser

React Native compatible package to parse RSS feeds

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-native-rss-parser

React Native compatible RSS parser

npm version Build Status

Parse RSS data into a simple object structure. Currently supports;

  • RSS 2.0 specification
  • Atom 1.0 specification

Installation

npm install react-native-rss-parser --save

Usage example

import * as rssParser from 'react-native-rss-parser';

return fetch('http://www.nasa.gov/rss/dyn/breaking_news.rss')
  .then((response) => response.text())
  .then((responseData) => rssParser.parse(responseData))
  .then((rss) => {
    console.log(rss.title);
    console.log(rss.items.length);
  });

Parsed model

{
  type: undefined,
  title: undefined,
  links: [{
    url: undefined,
    rel: undefined
  }],
  description: undefined,
  language: undefined,
  copyright: undefined,
  authors: [{
    name: undefined
  }],
  lastUpdated: undefined,
  lastPublished: undefined,
  categories: [{
    name: undefined
  }],
  image: {
    url: undefined,
    title: undefined,
    description: undefined,
    width: undefined,
    height: undefined
  },
  items: [{
    title: undefined,
    links: [{
      url: undefined,
      rel: undefined
    }],
    description: undefined,
    content: undefined,
    categories: [{
      name: undefined
    }],
    authors: [{
      name: undefined
    }],
    published: undefined,
    enclosures: [{
      url: undefined,
      length: undefined,
      mimeType: undefined
    }]
  }]
}

Model mappings

Top Level elements

Parsed ValueRSS v2.0Atom v1.0
titletitletitle
linkslinklink
descriptiondescriptionsubtitle
languagelanguage
copyrightcopyrightrights
authorsmanagingEditorauthor
publishedpubDatepublished
updatedlastBuildDateupdated
categoriescategorycategory
imageimagelogo
itemsitementry

Item / Entry Level elements

Parsed ValueRSS v2.0Atom v1.0
titletitletitle
linkslinklink
descriptiondescriptionsummary
contentcontent
categoriescategorycategory
authorsauthorcontributor
publishedpubDatepublished
enclosuresenclosureslink

Development setup

Clone this project from GitHub

npm install
npm test

Bugs / feature requests

If you find any bugs or have a feature request, please create an issue in GitHub.

Contributing

  1. Fork it (https://github.com/jameslawler/react-native-rss-parser)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

License

Distributed under the MIT license. See LICENSE for more information.

Keywords

FAQs

Package last updated on 30 Jan 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc