syndication-fetcher
TypeScript icon, indicating that this package has built-in type declarations

1.10.0 • Public • Published

syndication-fetcher NPM Package

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

npm install syndication-fetcher

Usage

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

interface IFeed {
  title: string;
  description: string;
  link: string;
  items: Array<IFeedItem>;
}

interface IFeedItem {
  id: string;
  title: string;
  description: string;
  link: string;
  pubDate: Date | null;
  content: string; 
}

Readme

Keywords

none

Package Sidebar

Install

npm i syndication-fetcher

Weekly Downloads

1

Version

1.10.0

License

MIT

Unpacked Size

85.8 kB

Total Files

16

Last publish

Collaborators

  • bradymholt