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

sitecompare

v0.0.4

Published

Tool to compare the html of two versions of a website. For example to make sure the output is the same after refactoring the code.

Readme

#Sitecompare

This is a tool to compare two versions of a website making sure they are exactly the same.

When is this useful? For example after upgrading versions of the underlying components or after refactoring the code. After any change that shouldn’t affect the output.

If your site has a lot of pages it could be quite tedious and time consuming to compare the output manually.

You could for example deploy the new version to your staging server, synchronize the databases and then use this tool to make sure the output is the same.

But some of the code on the staging server will always be different. For example timestamps or version numbers on css includes, base urls for images and so on. Can I still use this? Yes! You can supply a list of regular expressions of content to remove from both versions before comparing the result.

##Installation

Make sure you are running a node version above 6.0.0 by running node --version

You can use nvm to install multiple node versions.

Install sitecompare by running

npm install sitecompare -g

Configuration

Here is a sample config file. Specify the base url for the expected version (for example your production site) and your actual version (for example your staging server), lists of regular expressions for content to remove and finally a list of paths to compare from the two website versions.

Expected:
  BaseUrl: http://www.example.com
  RemoveContentRegex:
    - <script src="/assets/vendor.js?(.*)">
    - https://img.example.com
Actual:
  BaseUrl: http://staging.example.com
  RemoveContentRegex:
    - <script src="/assets/vendor.js?(.*)">
    - https://img-staging.example.com
Paths:
  - /
  - /about
  - /search?q=hello

Usage

sitecompare <config file>

for example

sitecompare config.yaml