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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nooptoday/feed-rs

v1.0.0

Published

Fastest RSS parser with the power of Rust. This package includes Node.js bindings from feed_rs package

Downloads

11

Readme

Fastest RSS parser in the NPM 🚀

Thanks to the power of Rust and the upstream repository authors, this package is the fastest RSS parser you can find.

Description

Feed parser for Node.js. List of supported feeds

  • RSS0
  • RSS1
  • RSS2
  • Atom
  • JSON

This package contains Node.js bindings from the Rust crate feed_rs.

I've tried to be as much compliant as possible with the original package's models. The Rust crate also contains lots of helpful comments, which I've also included in this package.

Installation

npm install @nooptoday/feed-rs

Usage

import { parse } from '@nooptoday/feed-rs'

const response = await fetch('https://nooptoday.com/rss')
const rss = await response.text()
const feed = parse(rss, 'https://nooptoday.com')

console.log(feed) // Feed Object

Error Handling

As long as the input contains valid feed data, there shouldn't be any errors. In case something goes wrong, these are all the possible errors you might encounter.

no root element
unsupported content type {mime}
missing content element {element}
unable to read feed: {reason}
unable to parse JSON: {reason}
unsupported version: {version}
unable to parse XML: {reason}

Benchmark

Test results are obtained from a local M2 Air installation.

feed-rs          2367 ops/s, ±0.39%   | fastest
fast-xml-parser  1198 ops/s, ±0.26%   | 49.39% slower
rss-parser:      125 ops/s,  ±2.27%   | slowest, 94.72% slower