# feed-watch

> A highly configurable lightweight module for watching/emitting changes in rss feeds

Latest version **0.1.3** (published 2020-07-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install feed-watch
pnpm add feed-watch
yarn add feed-watch
bun add feed-watch
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2020-07-10 |
| First published | 2020-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 130.1 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sumit Agarwal |
| Maintainers | agarwal-sumit |
| Keywords | rss, feed, atom, rdf, xml, syndication, rsscloud, rss watch, rss emit, feedwatch |

## Links

- npm: https://www.npmjs.com/package/feed-watch
- Repository: https://github.com/agarwal-sumit/feed-watch
- Issues: https://github.com/agarwal-sumit/feed-watch/issues
- npm.io page: https://npm.io/package/feed-watch

## Dependencies (5)

- [zlib](https://npm.io/package/zlib.md) ^1.0.5
- [axios](https://npm.io/package/axios.md) ^0.19.2
- [iconv](https://npm.io/package/iconv.md) ^2.3.5
- [feedparser](https://npm.io/package/feedparser.md) ^2.2.9
- [@types/mocha](https://npm.io/package/@types/mocha.md) ^7.0.2

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2020-07-10
- 0.1.2 — 2020-04-08
- 0.1.1 — 2020-04-08
- 0.1.0 — 2020-04-08

## README

# feed-watch

feed-watch is a highly configurable lightweight module for watching/emitting changes in rss feeds.

## Installation
You can install feed-watch by using:
```
  npm install feed-watch
```

## Usage

A basic feed-watch can be implemented as follows:
```ts
  import FeedWatch, { FeedConfig, FeedItem, FeedItemEvent } from 'feed-watch';

  const feedWatch = new FeedWatch();

  const myUidGenerator = (feedItem: FeedItem) => `${feedItem.guid}`;

  const feed: FeedConfig = {
    name: 'my-feed',
    url: '<my-feed-url>',
    refreshRateInSecs: 100,
    skipInitialList: false, // set this to true if you do not want events for the initial set of items.
    uidGenerator: null; // takes in a fuction that returns a unique string for every feed item, used to de-dupe
                        // make sure that this can uniquely identify an item in the feed.
    parserOpts: {}; // config options for feed-parser
    requestOpts: { // config options for axios
      headers: {
        'user-agent': '<user-agent-string>'
      }
    };
  }

  feedWatch.on('error', (err) => {
    console.error(err);
  });

  feedWatch.on('item', ({ feed, item }: FeedItemEvent) => {
    console.log(feed, item);
  });

  feedWatch.add(feed);
```

---
_Source: https://npm.io/package/feed-watch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
