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

service-worker-mock

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

service-worker-mock - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

18

models/Cache.js

@@ -10,3 +10,3 @@ // https://developer.mozilla.org/en-US/docs/Web/API/Cache

if (this.store.has(url)) {
return Promise.resolve(this.store.get(url)[0]);
return Promise.resolve(this.store.get(url));
}

@@ -19,3 +19,3 @@ return Promise.resolve(null);

if (this.store.has(url)) {
return Promise.resolve(this.store.get(url));
return Promise.resolve([this.store.get(url)]);
}

@@ -39,7 +39,3 @@ return Promise.resolve(null);

const url = request.url || request;
if (this.store.has(url)) {
this.store.get(url).push(response);
} else {
this.store.set(url, [response]);
}
this.store.set(url, response);
return Promise.resolve();

@@ -50,7 +46,3 @@ }

const url = request.url || request;
if (this.store.has(url)) {
this.store.delete(url);
return Promise.resolve(true);
}
return Promise.resolve(false);
return Promise.resolve(this.store.delete(url));
}

@@ -70,3 +62,3 @@

}
snapshot[key] = entry[1][0];
snapshot[key] = entry[1];
}

@@ -73,0 +65,0 @@ return snapshot;

@@ -5,3 +5,3 @@ // stubs https://developer.mozilla.org/en-US/docs/Web/API/Response

this.body = body || '';
this.status = (init && init.status) || 200;
this.status = (init && typeof init.status === 'number') ? init.status : 200;
this.ok = this.status >= 200 && this.status < 300;

@@ -8,0 +8,0 @@ this.statusText = (init && init.statusText) || 'OK';

{
"name": "service-worker-mock",
"version": "1.2.2",
"version": "1.2.3",
"main": "index.js",

@@ -5,0 +5,0 @@ "repository": {

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