New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cors-storage

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cors-storage - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

_page.js

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

!function(){"use strict";function t(t,o){for(var r in o)t[r]=o[r];return t}function o(t,o,r){this.data=t,this.source=o,this.origin=r}o.prototype={constructor:o,post:function(o){this.source.postMessage(JSON.stringify(t({},o||{},this.data._requestID)),this.origin)},postData:function(t){this.post({data:t})},postError:function(t){this.post({error:t})}},function(t){window.addEventListener("message",function(r){var i=JSON.parse(r.data),n=r.source,s=r.origin;t(new o(i,n,s))},!1)}(function(t){var o=t.data,r=t.postError.bind(t),i=t.postData.bind(t);if(!o.obj)return r('missing "obj" property');var n=window[o.obj];if(!n)return r(o.obj+" not supported");if(!o.op)return r('missing "op" property');if(!(o.op in n))return r("method does not exists "+o.obj+"."+o.op);try{i(n[o.op].apply(n,o.args||[]))}catch(t){r(t.message)}})}();
!function(){"use strict";function t(t,o){for(var r in o)t[r]=o[r];return t}function o(t,o,r){this.data=t,this.source=o,this.origin=r}o.prototype={constructor:o,post:function(o){var r=t({},o||{});r=t(r,{_requestID:this.data._requestID}),this.source.postMessage(JSON.stringify(r),this.origin)},postData:function(t){this.post({data:t})},postError:function(t){this.post({error:t})}},function(t){window.addEventListener("message",function(r){var i=JSON.parse(r.data),s=r.source,n=r.origin;t(new o(i,s,n))},!1)}(function(t){var o=t.data,r=t.postError.bind(t),i=t.postData.bind(t);if(!o.obj)return r('missing "obj" property');var s=window[o.obj];if(!s)return r(o.obj+" not supported");if(!o.op)return r('missing "op" property');if(!(o.op in s))return r("method does not exists "+o.obj+"."+o.op);try{i(s[o.op].apply(s,o.args||[]))}catch(t){r(t.message)}})}();

@@ -91,3 +91,5 @@ import Promise from 'pinkie-promise';

//IE8 and IE9 need target will be iframe domain (for mystic security reasons)
this.frame.contentWindow.postMessage(JSON.stringify(merge({}, data, { _requestID: id })), this.baseUrl);
data = merge({}, data);
data = merge(data, { _requestID: id });
this.frame.contentWindow.postMessage(JSON.stringify(data), this.baseUrl);
} else {

@@ -94,0 +96,0 @@ this.preLoadQueue.push({ data: data, resolve: _resolve, reject: _reject });

{
"name": "cors-storage",
"version": "1.0.1",
"version": "1.0.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -86,3 +86,5 @@ import { contentLoaded } from "document-promises-pinkie";

//IE8 and IE9 need target will be iframe domain (for mystic security reasons)
this.frame.contentWindow.postMessage(JSON.stringify(merge({}, data, { _requestID: id })), this.baseUrl);
data = merge({}, data);
data = merge(data, { _requestID: id });
this.frame.contentWindow.postMessage(JSON.stringify(data), this.baseUrl);
} else {

@@ -89,0 +91,0 @@ this.preLoadQueue.push({ data: data, resolve: _resolve, reject: _reject });

@@ -13,3 +13,5 @@ import merge from "./merge";

post: function(msg) {
this.source.postMessage(JSON.stringify(merge({}, msg || {}, { _requestID: this.data._requestID })), this.origin);
var data = merge({}, msg || {});
data = merge(data, { _requestID: this.data._requestID });
this.source.postMessage(JSON.stringify(data), this.origin);
},

@@ -16,0 +18,0 @@

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