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

rss-url-finder

v0.0.6

Published

A javascript/typescript library to search RSS feed via URL or HTML body

Downloads

250

Readme

RSS URL Finder

A javascript/typescript library to search RSS feed via URL or HTML body

Installation

⚠️ For now, is only compatible with node >=18 versions

npm install rss-url-finder
# or
pnpm install rss-url-finder
# or
yarn add rss-url-finder

How to use

import { getRssUrlsFromHtmlBody, getRssUrlsFromUrl } from 'rss-url-finder'

// If you need to search from URL
getRssUrlsFromUrl('https://cr0wg4n.medium.com/')
  .then((rssUrls) => {
    console.log(rssUrls)
  })
// Result: 
// [ 
//   { 
//     name: 'RSS', 
//     url: 'https://medium.com/feed/@cr0wg4n' 
//   } 
// ]

// If you need to search from HTML body
const rssUrls = getRssUrlsFromHtmlBody(`
<!doctype html>
<html lang="en" itemscope>
<head>
  <meta name="generator" content="Hexo 5.4.2"><link rel="alternate" href="/atom.xml" title="Dev-Academy.com - Web security | Testing & automation | Application architecture" type="application/atom+xml">
  <link rel="alternate" href="/rss2.xml" title="Dev-Academy.com - Web security | Testing & automation | Application architecture" type="application/rss+xml">
  <link rel="canonical" href="https://dev-academy.com/">
</head>
</figure>
<header>
  <div class="post-time">
    <time datetime="2022-12-22T00:00:00.000Z">22 December 2022</time>
  </div>
</header>
<body>
...... AND EXAMPLE OF HTML ...........
<script src="https://my.hellobar.com/3211232132.js" data-cookieconsent="ignore" charset="utf-8" async="async"></script>
</body>
</html>
`)
console.log(rssUrls)

// Result: 
// [
//   {
//     name: 'Dev-Academy.com - Web security | Testing & automation | Application architecture',
//     url: 'https://dev-academy.com/rss2.xml'
//   },
//   {
//     name: 'Dev-Academy.com - Web security | Testing & automation | Application architecture',
//     url: 'https://dev-academy.com/atom.xml'
//   }
// ]

Feel free to contribute to this repository

Made with ❤️ by cr0wg4n