Catalog npm
PACKAGE EXPLORERView in registry

3in1-package

npm

A sample npm package with a service worker.

npm-packageservice-worker
Versions collected4
Direct dependencies1From release 1.4.0
Last observed20 Oct, 19:46 UTC

README

Current package documentation

My NPM Package

This package provides a service worker implementation that can be used in web applications to manage caching and network requests.

Installation

To install the package, use npm:

npm install my-npm-package

Usage

To use the service worker in your project, register it in your main JavaScript file:

if ('serviceWorker' in navigator) {
    navigator.serviceWorker.register('/path-to-your-service-worker.js')
        .then((registration) => {
            console.log('Service Worker registered with scope:', registration.scope);
        })
        .catch((error) => {
            console.error('Service Worker registration failed:', error);
        });
}

Make sure to replace /path-to-your-service-worker.js with the actual path to the service worker file.

API

Public Methods

  • methodName: Description of the method and its usage.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 4

Collected releases
VersionPublishedDirect dependenciesOpen version
1.4.0Registry latest19 Dec 20241
1.2.019 Dec 20241
1.1.018 Dec 20243
1.0.018 Dec 20241

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:46 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:a5cdcff6a7854b1750f42982dc7583e1ebf461cd4aea15b2c892339c277ed321