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

quick-worker

v1.0.0

Published

Automatic browser file caching implementation with zero configuration.

Readme

Quick Worker

Automatic browser file caching implementation for your website/apps with zero configuration.

Features

  • Instant Page Loads - Automatic client-side caching for instant page loads after first visit
  • 🔄 Auto Cache Updates - Hash-based change detection automatically updates cache when files change
  • 📴 Offline Support - Works without internet connection with graceful offline fallback
  • ⚙️ Zero Configuration - Works out of the box with sensible defaults, minimal setup required
  • 🎯 Two Caching Strategies - Choose between static (full app caching) or runtime (runtime caching) modes

Installation

npm install quick-worker

Setup

Setup build command

Append quick-worker command after the default build command.

{
    "scripts": {
        "build": "my-build-command && quick-worker"
    }
}

Configuration

| Argument | Type | Default | Usage | | -------------- | ------ | --------- | ------------------------------------ | | --root | String | build | Build directory path | | --type | String | runtime | static or runtime | | --uncompressed | | false | Output uncompressed scripts | | --debug | | false | Add debugging logs in output scripts |

Example

quick-worker --root ./example --type runtime --uncompressed --debug

Add handler script in index.html

<body>
    ...

    <script src="/service-worker-handler.js"></script>
</body>

An empty js file service-worker-handler.js can be kept to avoid unwanted 404 error in dev mode.

Ready event

When the application updates its cache, a page reload will occur to use the latest files. It's recommended for apps to wait for the ready event.

window.addEventListener('QW_READY', () => {
    console.log('Quick Worker ready!')
})

Only occurs when new version of the application is deployed.

--type: static vs runtime

  • Apps which can work without internet should use static cache else runtime cache.
  • Runtime cache app should have offline html file offline.html which will be visible when there is not internet connection.

Custom service worker

Add your custom service worker code in service-worker-append.js file.

Migration from QuickWorker

To stop using quick-worker, first remove quick-worker command from build script.

To temporarily disable quick-worker service worker, update apphash.json as:

{ "disable": true }

To completely remove service worker from your application, update apphash.json as:

{ "unregister": true }

Files

  • apphash.json auto-generated: Keeps a track of cached files.
  • service-worker.js auto-generated: Main service worker file.
  • service-worker-handler.js auto-generated: Setup service worker, responsible for cache rotation & ready event.
  • service-worker-append.js: Contains custom code to be appended in the main service worker file.

Note

  • Avoid using Cache-Control header from your server to cache files.
  • When updating or removing QuickWorker, ensure apphash.json is updated accordingly; refer to the migration docs above.
  • Waiting for QW_READY event is recommended for smooth user experience.