Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

workbox-routing

Package Overview
Dependencies
Maintainers
3
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workbox-routing - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

build/importScripts/workbox-routing.dev.v0.0.2.js

6

package.json
{
"name": "workbox-routing",
"version": "0.0.1",
"version": "0.0.2",
"description": "A service worker helper library to route request URLs to handlers.",

@@ -25,4 +25,4 @@ "keywords": [

"homepage": "https://github.com/GoogleChrome/workbox/tree/master/packages/workbox-routing",
"main": "build/importScripts/workbox-routing.prod.v0.0.1.js",
"module": "build/modules/workbox-routing.prod.v0.0.1.mjs"
"main": "build/importScripts/workbox-routing.prod.v0.0.2.js",
"module": "build/modules/workbox-routing.prod.v0.0.2.mjs"
}

@@ -21,2 +21,4 @@ /*

*
* **Install:** `npm install --save-dev workbox-routing`
*
* @module workbox-routing

@@ -23,0 +25,0 @@ */

@@ -38,3 +38,3 @@ /*

* // segment passed along to the handler via params.file.
* const route = new goog.routing.ExpressRoute({
* const route = new workbox.routing.ExpressRoute({
* path: '/path/to/:file',

@@ -47,3 +47,3 @@ * handler: ({event, params}) => {

*
* const router = new goog.routing.Router();
* const router = new workbox.routing.Router();
* router.registerRoute({route});

@@ -53,3 +53,3 @@ *

* // Any cross-origin requests for https://example.com will match this route.
* const route = new goog.routing.ExpressRoute({
* const route = new workbox.routing.ExpressRoute({
* path: 'https://example.com/path/to/:file',

@@ -59,3 +59,3 @@ * handler: ({event}) => return caches.match(event.request),

*
* const router = new goog.routing.Router();
* const router = new workbox.routing.Router();
* router.registerRoute({route});

@@ -62,0 +62,0 @@ *

@@ -45,3 +45,3 @@ /*

* // app-shell.html.
* const route = new goog.routing.NavigationRoute({
* const route = new workbox.routing.NavigationRoute({
* whitelist: [new RegExp('^/article/')],

@@ -51,3 +51,3 @@ * handler: {handle: () => caches.match('app-shell.html')},

*
* const router = new goog.routing.Router();
* const router = new workbox.routing.Router();
* router.registerRoute({route});

@@ -54,0 +54,0 @@ */

@@ -51,3 +51,3 @@ /*

* // the capture groups passed along to the handler as an array via params.
* const route = new goog.routing.RegExpRoute({
* const route = new workbox.routing.RegExpRoute({
* regExp: new RegExp('^https://example.com/path/to/(\\w+)'),

@@ -63,3 +63,3 @@ * handler: {

*
* const router = new goog.routing.Router();
* const router = new workbox.routing.Router();
* router.registerRoute({route});

@@ -66,0 +66,0 @@ */

@@ -36,3 +36,3 @@ /*

* // Any navigate requests for URLs that start with /path/to/ will match.
* const route = new goog.routing.Route({
* const route = new workbox.routing.Route({
* match: ({url, event}) => {

@@ -48,3 +48,3 @@ * return event.request.mode === 'navigate' &&

*
* const router = new goog.routing.Router();
* const router = new workbox.routing.Router();
* router.registerRoute({route});

@@ -51,0 +51,0 @@ *

@@ -41,12 +41,14 @@ /*

* regExp: /assets/,
* handler: new goog.runtimeCaching.StaleWhileRevalidate(),
* handler: new workbox.runtimeCaching.StaleWhileRevalidate(),
* });
* const imageRoute = new RegExpRoute({
* regExp: /images/,
* handler: new goog.runtimeCaching.CacheFirst(),
* handler: new workbox.runtimeCaching.CacheFirst(),
* });
*
* const router = new goog.routing.Router();
* const router = new workbox.routing.Router();
* router.registerRoutes({routes: [assetRoute, imageRoute]});
* router.setDefaultHandler({handler: new goog.runtimeCaching.NetworkFirst()});
* router.setDefaultHandler({
* handler: new workbox.runtimeCaching.NetworkFirst(),
* });
*/

@@ -159,3 +161,3 @@ class Router {

* router.setDefaultHandler({
* handler: new goog.runtimeCaching.NetworkFirst()
* handler: new workbox.runtimeCaching.NetworkFirst()
* });

@@ -162,0 +164,0 @@ *

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc