2.3.0 • Published 6 years ago

the-sw-util v2.3.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

the-sw-util

Build Status npm Version JS Standard

Utility for service workers

Installation

$ npm install the-sw-util --save

Usage

'use strict'

const {appCache, cachingFetch} = require('the-sw-util')

async function tryExample () {

  self.addEventListener('fetch', (event) => {
    event.respondWith(
      async function () {
        const cache = await appCache('my-site', 'v1.0.0')
        return cachingFetch(cache, event.request)
      }()
    )
  })

}

tryExample().catch((err) => console.error(err))

API Guide

License

This software is released under the MIT License.

Links

2.3.0

6 years ago

2.2.0

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago