feed
Generate RSS 2.0, Atom 1.0, and JSON Feed 1.0 syndication feeds from a single TypeScript API.
Repository Health
Technical Analysis
Feed is a lightweight, strongly-typed Node.js library for generating web syndication feeds. A single Feed instance can render RSS 2.0, Atom 1.0, and JSON Feed 1.0 output from the same set of items, options, authors, categories, and extensions, so publishers don’t need to hand-write XML or maintain separate serializers for each format.
Under the hood it models feed metadata and items as plain TypeScript interfaces, then calls format-specific renderers (rss2, atom1, json) that convert that model into the correct markup using xml-js. The library covers podcast/iTunes extensions, custom XML extensions, media enclosures (image/audio/video), and WebSub hub links, making it a common choice for blogs, podcast feeds, and content platforms that need standards-compliant feeds without a full CMS.
What You Get
- A single Feed class that renders RSS 2.0, Atom 1.0, and JSON Feed 1.0 from the same items and options
- Full TypeScript types for feed options, items, authors, categories, enclosures, and extensions
- Support for podcast/iTunes feed extensions and custom XML extensions per item
- Automatic URL and XML entity sanitization for titles, links, and descriptions
- WebSub/PubSubHubbub hub links and self-referencing atom:link support
Common Use Cases
- Adding an RSS/Atom feed to a blog or documentation site’s build pipeline
- Generating podcast feeds with iTunes-compatible extensions
- Serving a JSON Feed 1.0 endpoint alongside legacy RSS/Atom for API-driven clients
- Publishing changelog or release feeds from a static site generator
Under The Hood
Architecture The library is organized as a small modular renderer pipeline: feed.ts defines the Feed class holding an in-memory options/items/categories/contributors/extensions model; three sibling renderer modules (rss2.ts, atom1.ts, json.ts) each take a Feed instance and independently walk that same model to build an ElementCompact tree consumed by xml-js, with typings/index.ts as the single source of truth for the Item/FeedOptions/Author/Category/Enclosure/Extension shapes shared across all three renderers, and utils.ts providing small sanitize/sanitizeUrl helpers used by every renderer to escape ampersands and validate URLs before they hit XML output. There’s no dependency injection or plugin registry - adding a fourth format means writing a new renderer function and wiring it into Feed as a new method, and swapping the underlying XML library would require touching all three renderers since each directly imports xml-js.
Tech Stack TypeScript with a strict, modern compiler configuration (ESNext target, strict mode, verbatimModuleSyntax, isolatedModules, bundler module resolution), a single runtime dependency (xml-js) for JSON-to-XML conversion, and a fully modern dev toolchain: tsdown for bundling, vitest for testing, biome for combined linting and formatting, and pnpm as the package manager with a pinned version. The package ships ESM-only output with generated type declarations, and continuous integration runs lint, format-check, a type-check build, and the test suite on every push and pull request.
Code Quality Tests live alongside the source in a dedicated tests directory using vitest with snapshot testing for the RSS, Atom, and JSON renderers, plus a small suite for the shared utility helpers, all built on one reusable sample feed fixture. Error handling is largely implicit - URL validation relies on the platform’s URL constructor throwing rather than any custom validation layer - but naming is consistent and the strict TypeScript configuration (no implicit any, no implicit returns) gives strong compile-time guarantees. Test depth is somewhat uneven across the three renderers, with the RSS suite considerably more extensive than the JSON Feed suite.
API Design The public surface is intentionally minimal - one class with a handful of mutator methods (addItem, addCategory, addContributor, addExtension) and three render methods (rss2, atom1, json1) - so producing a working feed takes only a few lines of code. Option and field names map directly onto RSS/Atom/JSON Feed spec vocabulary, so anyone already familiar with syndication formats can guess most of the API without reading documentation. The README documents the full option surface in table form and calls out a breaking import change from older versions, though the project has no dedicated examples directory beyond the single README snippet.
Used by 6 apps in this directory
Blinko
Knowledge Management · Note Taking
A self-hosted, AI-powered card note-taking tool that lets you capture fleeting thoughts instantly and retrieve them with natural language search.
ByteChef
Automation · AI Agents
Unified open-source platform for AI agent orchestration and workflow automation with 180+ connectors, MCP support, and durable execution.
OpenStatus
Monitoring · Devops
Open-source status pages and uptime monitoring with global synthetic checks, monitoring-as-code, and AI agent integration via MCP.
Rivet
AI Agents · Developer Tools
Stateful actors as a primitive for AI agents, real-time collaboration, and durable execution — with in-memory state, WebSockets, queues, and scheduling built in.
sigle
Blogging
A decentralized, open-source writing platform that permanently stores your stories on the Stacks blockchain and Arweave — where Web3 content creators own their words forever.
Uptime Kuma
Monitoring
Self-hosted monitoring for every service you run — 23 monitor types, 95 notification channels, live dashboards, and public status pages with no vendor lock-in.