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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@hazae41/immutable

v2.0.15

Published

Create immutable webapps

Readme

The Immutable Toolbox

Create immutable webapps that are secure and resilient

npm install @hazae41/immutable
deno install jsr:@hazae41/immutable

📦 NPM📦 JSR

Philosophy

The philosophy is to build webapps that are as immutable as native apps but benefit from the wide distribution of the web. Such webapps are built with strong client-side and offline capabilities. Once downloaded they should be immutably cached and only be updated when the user requests it or has opted-in automatic updates.

Why?

Security and resilience. An immutable webapp is not prone to server-side attacks (e.g. DNS attack, BGP attack, TLS attack). An immutable webapp is always available to its users even if the server is compromised or censored. An immutable webapp can be distributed by other means than a centralized server (e.g. IPFS).

How?

New and smart engineering techniques. The extensive use of service-workers and new web APIs allow you to build such webapps. By using Cache-Control, Fetch API and Crypto API to distribute and cache webapps immutably. This toolbox improves and merges already existing tools such as Workbox to fit exactly our needs.

Technology

The most important thing about The Immutable Toolbox is that service-workers are immutably cached.

This is done by using Cache-Control headers and { updateViaCache: "all" } options.

The service-worker is cached for one year, so it won't be auto-updated before one year has passed.

In order to update it before one year, we need to register() a new service-worker at a different URL.

The webapp runtime fetches service_worker.js and check its integrity hash in order to detect updates.

If an update is detected, it can register() the new service_worker.js?version=<version> file.

Thus the developer or user is in control of when to update the webapp (e.g. a yes/no/always button).

The other great thing is that all other files are also immutably cached by the service-worker.

This is done just like workbox but with even more checks as the hashes are also verified.

All files are hashed and verified using native SHA-256 which is both strong and fast.

This makes your webapp immutable, as long as the service worker is not updated.

It is compatible with HTTPSec, which means the HTML page can have its integrity enforced.

Unfortunately, HTTPSec can't enforce the service worker, but it can enforce pages, and pages can enforce in-page scripts and assets.

So you shouldn't use the service worker for anything important except caching your webapp or doing normal service worker stuff.

The webapp is only compromisable when you first download it, when you manually update it, or when it's auto-updated after one year.

Subframeworks

Examples

Here is a list of immutable webapps

  • https://wallet.brume.money / https://github.com/brumeproject/wallet