Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

syndication-fetcher

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

syndication-fetcher

A RSS and Atom fetcher and parser

latest
Source
npmnpm
Version
1.10.0
Version published
Maintainers
1
Created
Source

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; 
}

FAQs

Package last updated on 02 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts