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

loading-stats

v0.0.2

Published

For tracking web app loading performance for single page apps.

Readme

loading-stats

Getting real-world performance metrics from deployed single page webapps is super useful.

You can see how caching strategies affect load times and also make sure you're not causing speed regressions over time. When you're working on localhost or fast internet you may do things that seem like acceptable speed tradeoffs that actually are significantly more impactful for your users who may be on slower connections. By having these metrics reported back from each user you can very quickly get great perspective on how your app is performing for people.

This is a very simple client side module (compatible with clientmodules and browserify) for tracking that load time and the various pieces of it and is designed to be used for reporting back to a metrics service. At &yet we send this as metadata for our "applicationLoaded" event that gets sent to (usually) mixpanel. But which one doesn't really matter, this just tracks the times and reports them.

Here's how it works.

How to use it

Add this bit of vanilla JS to your base HTML as high up in the <head> as you can. To get as accurate of a load start time as possible:

<!DOCTYPE html>
<script>window.times = {start: Date.now()};</script>
<script src="app.js"></script>

Then at various points that you want to track within your app's load sequence, just call recordEvent() with whatever description makes sense for your app:

// require our module
var loadStats = require('loading-stats');

// for example
loadStats.recordEvent('begin launch sequence');

// sometime later you may do...
loadStats.recordEvent('initial data fetched');

// then get your summary and send it off to your
// metrics service. For example
mixpanel.track('web app loaded', loadStats.getSummary());

/*
the .getSummary(); method will return an object
that looks like this. With each event being miliseconds
from the start time we put in our HTML above.

{
    'ms to begin launch sequence': 100,
    'ms to begin launch sequence': 323,
    'ms to fully loaded': 431
}
*/

Getting real stats in the wild is awesome

yup.

Installing

npm i loading-stats

Add it to your clientmodules or user browserify to include it in your app. voila!

Feedback

If you dig it, follow @HenrikJoreteg on the twitterwebs. If not, file issues or send pull requests :)

License

MIT