Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bradymholt/syndication-fetcher
A RSS and Atom feed parser
https://github.com/bradymholt/syndication-fetcher
atom rss rss-feed rss-reader
Last synced: 16 days ago
JSON representation
A RSS and Atom feed parser
- Host: GitHub
- URL: https://github.com/bradymholt/syndication-fetcher
- Owner: bradymholt
- License: mit
- Created: 2023-01-27T15:47:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-02T16:47:53.000Z (almost 2 years ago)
- Last Synced: 2024-10-19T18:45:11.062Z (27 days ago)
- Topics: atom, rss, rss-feed, rss-reader
- Language: TypeScript
- Homepage:
- Size: 117 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# syndication-fetcher [![NPM Package](https://img.shields.io/npm/v/syndication-fetcher.svg)](https://www.npmjs.com/package/syndication-fetcher)
A RSS and Atom feed fetcher and parser. Given a URL, it will fetch a feed and parse it into a common JavaScript object. TypeScript types are included.
## Installation
```bash
npm install syndication-fetcher
```## Usage
```javascript
import { fetchFeed } from "syndication-fetcher";
// or using CommonJS
// const { fetchFeed } = require("syndication-fetcher");const feed = await fetchFeed("https://example.com/feed.xml");
/* `feed` is an object that conforms to the IFeed interface described below */
```## TypeScript types
```typescript
interface IFeed {
title: string;
description: string;
link: string;
items: Array;
}interface IFeedItem {
id: string;
title: string;
description: string;
link: string;
pubDate: Date | null;
content: string;
}
```