feed-js

2.0.0 • Public • Published

Feed

Library that makes easy to parse an RSS feed in your client-side.

Feed calls YQL internally.

Browser Compatibility

Feed is compatible with the following browsers/versions:

  • Google Chrome
  • Firefox
  • Safari
  • IOS Safari
  • Opera
  • IE 6+

Instalation

To install Feed, execute:

  npm install feed-js

Or Bower too:

  bower install feed

Or simply pick up the file from src directory.

Parameters

  • context Object (window by default)
  • url String (undefined by default)
  • number Number (it's the total of posts 10 by default)
  • callback Function (Function by default)

Example

var render = function(posts) {
  posts.item.forEach(function (element) {
    console.log(element.title);
    console.log(element.link);
  });
};
 
window.Feed({
  url: 'https://news.ycombinator.com/rss',
  number: 3,
  callback: render
});

/feed-js/

    Package Sidebar

    Install

    npm i feed-js

    Weekly Downloads

    3

    Version

    2.0.0

    License

    none

    Unpacked Size

    7.52 kB

    Total Files

    11

    Last publish

    Collaborators

    • evandrolg