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

fett-tracker

v1.0.1

Published

Tracks running instances of your web app

Downloads

2

Readme

Fett

Fett is a small JS library to track how many versions of your web app are running.

Named after the greatest clone of all time, Boba Fett, Fett updates window.localStorage each time a new instance of your web app is opened in a new tab. It provides utilities to add and remove listeners, so you can react to the creation and removal of instances.

View a working demo of it here.

Why Fett?

Lots of apps are built as SPAs - designed to be navigated like a native app - but used more like a static page. If you've ever opened a resource-hungry SPA across ten or fifteen browser tabs, you have felt this pain as well. Integrating Fett into your app will allow users who do this kind of thing to have a smoother experience.

You can turn off features of your app as more instances of your app load, or even send the number of instances as a param to the server and have that return a static page instead of a SPA. At the very least, you can display a message to warn the user that they're not using your whiz-bang Babel-transpiled Webpack-bundled Redux app properly.

Installation

Run npm install fett-tracker or copy /src/fett.js.

API

startCounting

Before you can do anything, you have to call fett.startCounting('myCoolKey'), which takes an optional string parameter so you can set the key you'd like to use in localStorage. If you call startCounting with no parameters, it will choose a key for you. Feel free to call startCounting multiple times - it doesn't overwrite the data in localStorage.

numInstances

Once your app is counting its instances, call fett.numInstances() to get the number of current instances.

addListener and removeListener

To react to instances of your app being created or destroyed, you can add and remove listeners with fett.addListener(function) and fett.removeListener(function). The function you pass to addListener will be called every time localStorage changes.