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

workbox-strategies

Package Overview
Dependencies
Maintainers
4
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workbox-strategies - npm Package Compare versions

Comparing version 3.0.0-beta.2 to 3.0.0

2

build/workbox-strategies.dev.js

@@ -6,3 +6,3 @@ this.workbox = this.workbox || {};

try {
self.workbox.v['workbox:strategies:3.0.0-beta.2'] = 1;
self.workbox.v['workbox:strategies:3.0.0'] = 1;
} catch (e) {} // eslint-disable-line

@@ -9,0 +9,0 @@

@@ -1,3 +0,3 @@

this.workbox=this.workbox||{},this.workbox.strategies=function(e,t,r){"use strict";try{self.workbox.v["workbox:strategies:3.0.0-beta.2"]=1}catch(e){}class s{constructor(t={}){this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[],this.r=t.fetchOptions||null}handle({event:e}){var r=this;return babelHelpers.asyncToGenerator(function*(){let s,n=yield t.cacheWrapper.match(r.e,e.request,null,r.t);if(!n)try{n=yield r.s(e)}catch(e){s=e}if(s)throw s;return n})()}s(e){var s=this;return babelHelpers.asyncToGenerator(function*(){const n=yield r.fetchWrapper.fetch(e.request,s.r,s.t),i=n.clone();return e.waitUntil(t.cacheWrapper.put(s.e,e.request,i,s.t)),n})()}}class n{constructor(t={}){this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[]}handle({event:e}){var r=this;return babelHelpers.asyncToGenerator(function*(){return yield t.cacheWrapper.match(r.e,e.request,null,r.t)})()}}var i={cacheWillUpdate:({response:e})=>e.ok||0===e.status?e:null};class l{constructor(t={}){if(this.e=e.cacheNames.getRuntimeName(t.cacheName),t.plugins){let e=t.plugins.some(e=>!!e.cacheWillUpdate);this.t=e?t.plugins:[i,...t.plugins]}else this.t=[i];this.n=t.networkTimeoutSeconds,this.r=t.fetchOptions||null}handle({event:e}){var t=this;return babelHelpers.asyncToGenerator(function*(){const r=[],s=[];let n;if(t.n){const{id:i,promise:l}=t.i(e,r);n=i,s.push(l)}const i=t.l(n,e,r);s.push(i);let l=yield Promise.race(s);return l||(l=yield i),l})()}i(e,t){var r=this;let s;const n=new Promise(t=>{const n=(()=>{var s=babelHelpers.asyncToGenerator(function*(){t(yield r.o(e.request))});return function(){return s.apply(this,arguments)}})();s=setTimeout(n,1e3*this.n)});return{promise:n,id:s}}l(e,s,n){var i=this;return babelHelpers.asyncToGenerator(function*(){let n,l;try{l=yield r.fetchWrapper.fetch(s.request,i.r,i.t)}catch(e){n=e}if(e&&clearTimeout(e),n||!l)l=yield i.o(s.request);else{const e=l.clone();s.waitUntil(t.cacheWrapper.put(i.e,s.request,e,i.t))}return l})()}o(e){return t.cacheWrapper.match(this.e,e,null,this.t)}}class o{constructor(t={}){this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[],this.r=t.fetchOptions||null}handle({event:e}){var t=this;return babelHelpers.asyncToGenerator(function*(){let s,n;try{n=yield r.fetchWrapper.fetch(e.request,t.r,t.t)}catch(e){s=e}if(s)throw s;return n})()}}class c{constructor(t={}){if(this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[],t.plugins){let e=t.plugins.some(e=>!!e.cacheWillUpdate);this.t=e?t.plugins:[i,...t.plugins]}else this.t=[i];this.r=t.fetchOptions||null}handle({event:e}){var r=this;return babelHelpers.asyncToGenerator(function*(){const s=r.s(e);let n=yield t.cacheWrapper.match(r.e,e.request,null,r.t);return n?e.waitUntil(s):n=yield s,n})()}s(e){var s=this;return babelHelpers.asyncToGenerator(function*(){const n=yield r.fetchWrapper.fetch(e.request,s.r,s.t);return e.waitUntil(t.cacheWrapper.put(s.e,e.request,n.clone(),s.t)),n})()}}var h=Object.freeze({CacheFirst:s,CacheOnly:n,NetworkFirst:l,NetworkOnly:o,StaleWhileRevalidate:c});const u={cacheFirst:s,cacheOnly:n,networkFirst:l,networkOnly:o,staleWhileRevalidate:c},a={};Object.keys(u).forEach(e=>{a[e]=((t={})=>{return new(0,u[e])(Object.assign(t))})});return Object.assign(a,h)}(workbox.core._private,workbox.core._private,workbox.core._private);
this.workbox=this.workbox||{},this.workbox.strategies=function(e,t,r){"use strict";try{self.workbox.v["workbox:strategies:3.0.0"]=1}catch(e){}class s{constructor(t={}){this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[],this.r=t.fetchOptions||null}handle({event:e}){var r=this;return babelHelpers.asyncToGenerator(function*(){let s,n=yield t.cacheWrapper.match(r.e,e.request,null,r.t);if(!n)try{n=yield r.s(e)}catch(e){s=e}if(s)throw s;return n})()}s(e){var s=this;return babelHelpers.asyncToGenerator(function*(){const n=yield r.fetchWrapper.fetch(e.request,s.r,s.t),i=n.clone();return e.waitUntil(t.cacheWrapper.put(s.e,e.request,i,s.t)),n})()}}class n{constructor(t={}){this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[]}handle({event:e}){var r=this;return babelHelpers.asyncToGenerator(function*(){return yield t.cacheWrapper.match(r.e,e.request,null,r.t)})()}}var i={cacheWillUpdate:({response:e})=>e.ok||0===e.status?e:null};class l{constructor(t={}){if(this.e=e.cacheNames.getRuntimeName(t.cacheName),t.plugins){let e=t.plugins.some(e=>!!e.cacheWillUpdate);this.t=e?t.plugins:[i,...t.plugins]}else this.t=[i];this.n=t.networkTimeoutSeconds,this.r=t.fetchOptions||null}handle({event:e}){var t=this;return babelHelpers.asyncToGenerator(function*(){const r=[],s=[];let n;if(t.n){const{id:i,promise:l}=t.i(e,r);n=i,s.push(l)}const i=t.l(n,e,r);s.push(i);let l=yield Promise.race(s);return l||(l=yield i),l})()}i(e,t){var r=this;let s;const n=new Promise(t=>{const n=(()=>{var s=babelHelpers.asyncToGenerator(function*(){t(yield r.o(e.request))});return function(){return s.apply(this,arguments)}})();s=setTimeout(n,1e3*this.n)});return{promise:n,id:s}}l(e,s,n){var i=this;return babelHelpers.asyncToGenerator(function*(){let n,l;try{l=yield r.fetchWrapper.fetch(s.request,i.r,i.t)}catch(e){n=e}if(e&&clearTimeout(e),n||!l)l=yield i.o(s.request);else{const e=l.clone();s.waitUntil(t.cacheWrapper.put(i.e,s.request,e,i.t))}return l})()}o(e){return t.cacheWrapper.match(this.e,e,null,this.t)}}class o{constructor(t={}){this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[],this.r=t.fetchOptions||null}handle({event:e}){var t=this;return babelHelpers.asyncToGenerator(function*(){let s,n;try{n=yield r.fetchWrapper.fetch(e.request,t.r,t.t)}catch(e){s=e}if(s)throw s;return n})()}}class c{constructor(t={}){if(this.e=e.cacheNames.getRuntimeName(t.cacheName),this.t=t.plugins||[],t.plugins){let e=t.plugins.some(e=>!!e.cacheWillUpdate);this.t=e?t.plugins:[i,...t.plugins]}else this.t=[i];this.r=t.fetchOptions||null}handle({event:e}){var r=this;return babelHelpers.asyncToGenerator(function*(){const s=r.s(e);let n=yield t.cacheWrapper.match(r.e,e.request,null,r.t);return n?e.waitUntil(s):n=yield s,n})()}s(e){var s=this;return babelHelpers.asyncToGenerator(function*(){const n=yield r.fetchWrapper.fetch(e.request,s.r,s.t);return e.waitUntil(t.cacheWrapper.put(s.e,e.request,n.clone(),s.t)),n})()}}var h=Object.freeze({CacheFirst:s,CacheOnly:n,NetworkFirst:l,NetworkOnly:o,StaleWhileRevalidate:c});const u={cacheFirst:s,cacheOnly:n,networkFirst:l,networkOnly:o,staleWhileRevalidate:c},a={};Object.keys(u).forEach(e=>{a[e]=((t={})=>{return new(0,u[e])(Object.assign(t))})});return Object.assign(a,h)}(workbox.core._private,workbox.core._private,workbox.core._private);
//# sourceMappingURL=workbox-strategies.prod.js.map
{
"name": "workbox-strategies",
"version": "3.0.0-beta.2",
"version": "3.0.0",
"license": "Apache-2.0",

@@ -30,4 +30,4 @@ "author": "Google's Web DevRel Team",

"dependencies": {
"workbox-core": "^3.0.0-beta.2"
"workbox-core": "^3.0.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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