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

speedlify2-score

v1.1.0

Published

A zero-dependency web component showing Lighthouse scores for a URL, published by a speedlify2 instance.

Readme

speedlify2-score

A zero-dependency web component that shows the Lighthouse scores a speedlify2 instance has measured for a URL, linking to that site's full report.

npm install speedlify2-score
import "speedlify2-score";
<speedlify2-score speedlify-url="https://www.speedlify.dev/"></speedlify2-score>

With no url attribute it describes the page it is embedded on. Point it at another measured URL to describe that one instead:

<speedlify2-score
  speedlify-url="https://www.speedlify.dev/"
  url="https://www.11ty.dev/"></speedlify2-score>

No build step is required — the file is a standard ES module and can be loaded straight from a <script type="module"> if you would rather not install it.

What it renders

Six rings: the four Lighthouse scores — Performance, Accessibility, Best Practices, SEO — then two more for axe (a full CLI run) and Core Web Vitals, the two things those four do not cover. The rings link to the site's report on the instance, where everything else it knows lives.

There is nothing to configure about the output, so a page carrying several badges reads as one table rather than a row of different shapes.

Attributes

| Attribute | Required | Description | | --------------- | -------- | ----------------------------------------------------------------- | | speedlify-url | yes | The root of the speedlify2 instance to read data from. | | url | no | The measured URL to describe. Defaults to the current page's URL. | | theme | no | light or dark. Absent, the badge follows the host page. |

Colors

The band colors are custom properties on the host, so a page can override any of them: --spdl-good, --spdl-average, --spdl-poor, --spdl-none and --spdl-track.

One request, no index

Unlike its predecessor, this component downloads no urls.json index. It works out the data file for a URL by slugifying that URL in the browser with the same rules the generator uses, so a page makes exactly one request for exactly the data it shows. No index, no hashing, and no secure context needed.

The trade-off: a site whose slug collided with another is published under its hash instead, and reads here as unmeasured rather than as the wrong site.

Exports

The element registers itself as <speedlify2-score> on import. The classes are also exported if you want to subclass or register under a different tag name:

import { SpeedlifyScore } from "speedlify2-score";

customElements.define("my-score", class extends SpeedlifyScore {});

License

MIT