0.0.4 • Published 7 years ago

feed-sub v0.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

feed-sub

Tracks rss/atom feeds and get notified when they are updated.

Build Status

Install

npm install --save feed-sub

yarn add feed-sub

Usage

import FeedSub from 'feed-sub';

const feed = new FeedSub([
  'https://github.com/facebook/react/tags.atom',
  'https://github.com/facebook/jest/tags.atom',
]);

// An item was updated
feed.on('update', (data) => {
  console.log(data);
});

// handle stream error
feed.on('error', (err) => {
  // An error occur
  console.log(err);
});

feed.start();

Api

###const feed = new FeedSub(urls, [options]) Create a new FeedSub instance.

  • urls - array - Array of urls.
  • options.interval - number - Number of seconds between two checks.

###feed.start() Start to stream.

###feed.stop() Stop the stream.

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago