sw-management

1.0.1-next • Public • Published

SW-Management.

PWA - Service Worker Management

Usage

Table of Contents

SWRegister

An Example how to use SW-management.

Examples

// src/index.js
import SWRegister from 'sw-management'
 
// Registration of Service - Worker
const swURL = 'https://example.com/service-worker.js' 
SWRegister.register(
 swURL,
 {
   onRegister: () => console.log('Has Registered with:', swURL)
 }
)
 
// Checking all of service-worker registered by SW-Management
SWRegister.all()
 
// Unregister All Service Worker
SWRegister.unregister()

Readme

Keywords

none

Package Sidebar

Install

npm i sw-management

Weekly Downloads

1

Version

1.0.1-next

License

MIT

Unpacked Size

421 kB

Total Files

14

Last publish

Collaborators

  • ri7nz