npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

feed-slurp

v1.0.2

Published

A lightweight, zero-dependency (well, almost!) RSS/Atom feed fetcher and parser with built-in caching and proxy support.

Readme

feed-slurp 🥤

A lightweight, universal RSS and Atom feed fetcher for the browser. Targeted for speed, reliability, and zero-dependency vibe (built on the BaryoDev stack).

Why feed-slurp?

  • Zero Heavy Dependencies: Instead of 50KB+ XML libraries, it uses the browser's native DOMParser.
  • BaryoDev Powered: Leverages resilient-fetcher for automatic retries and nano-safe-storage for robust caching.
  • Normalized Schema: No more worrying about the differences between RSS item tags and Atom entry tags. One clean JSON schema for everything.
  • CORS Friendly: Built-in support for popular proxies to bypass browser restrictions.
  • Smart Cache: Stale-while-revalidate inspired behavior via localStorage.

Installation

npm install feed-slurp

Basic Usage

import { slurp } from 'feed-slurp';

// Slurp a feed with default settings (auto-cache for 1 hour)
const feed = await slurp('https://medium.com/feed/@BaryoDev');

console.log(feed.title); // "BaryoDev - Medium"
console.log(feed.items[0].thumbnail); // Auto-extracted from content or tags!

Advanced Configuration

CORS Proxies

Most RSS feeds require a proxy for browser-based fetching. feed-slurp makes this easy:

const feed = await slurp(url, {
  proxy: 'allorigins' // Built-in: api.allorigins.win
  // OR
  proxy: 'corsproxy'  // Built-in: corsproxy.io
  // OR
  proxy: 'https://my-proxy.com/?url='
  // OR custom function
  proxy: (url) => `https://custom.worker.dev/fetch?target=${encodeURIComponent(url)}`
});

Caching Strategy

Caching is enabled by default to save bandwidth and improve performance.

const feed = await slurp(url, {
  cache: true,
  cacheTTL: 3600,       // 1 hour in seconds
  cacheKey: 'my-feed'   // Custom key for localStorage
});

// Manual cache cleanup
import { clearSlurpCache } from 'feed-slurp';
clearSlurpCache('my-feed'); // Clear specific
clearSlurpCache();          // Clear all

Output Schema

Regardless of whether the source is RSS 2.0 or Atom 1.0, you get this consistent structure:

interface SlurpFeed {
  title: string;
  description: string;
  link: string;
  lastBuildDate: string;
  items: SlurpItem[];
}

interface SlurpItem {
  title: string;
  link: string;
  pubDate: string;        // ISO 8601 string
  description: string;   // Plain text / snippet
  content: string;       // Full HTML content
  author: string;
  categories: string[];
  thumbnail: string | null; // Extracted thumbnail URL
  guid: string;
}

License

MPL-2.0 © Arnel I. Robles