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

array-buffer-cache-worker

Package Overview
Dependencies
Maintainers
1
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-buffer-cache-worker - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

build/es5/worker.min.js

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

!function(){"use strict";function a(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var b=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),c=function(){function c(){a(this,c),this._store=new Map}return b(c,[{key:"clone",value:function(a){var b=this._store.get(a);if(void 0===b)throw new Error('There is no arrayBuffer stored with an id called "'+a+'".');return b.slice(0)}},{key:"purge",value:function(a){if(!this._store.delete(a))throw new Error('There is no arrayBuffer stored with an id called "'+a+'".')}},{key:"slice",value:function(a,b,c){var d=this._store.get(a);if(void 0===d)throw new Error('There is no arrayBuffer stored with an id called "'+a+'".');return d.slice(b,null===c?d.byteLength:c)}},{key:"store",value:function(a,b){if(this._store.has(a))throw new Error('There is already an arrayBuffer stored with an id called "'+a+'".');this._store.set(a,b)}}]),c}(),d=new c;addEventListener("message",function(a){var b=a.data;try{if("clone"===b.action){var c=b.action,e=b.id,f=d.clone(e);postMessage({action:c,arrayBuffer:f,id:e},[f])}else if("purge"===b.action){var g=b.action,h=b.id;d.purge(h),postMessage({action:g,id:h})}else if("slice"===b.action){var i=b.action,j=b.begin,k=b.end,l=void 0===k?null:k,m=b.id,n=d.slice(m,j,l);postMessage({action:i,arrayBuffer:n,id:m},[n])}else if("store"===b.action){var o=b.action,p=b.arrayBuffer,q=b.id;d.store(q,p),postMessage({action:o,id:q})}}catch(a){postMessage({err:{message:a.message}})}})}();
!function(){"use strict";function e(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),t=new(function(){function t(){e(this,t),this._store=new Map}return r(t,[{key:"clone",value:function(e){var r=this._store.get(e);if(void 0===r)throw new Error('There is no arrayBuffer stored with an id called "'+e+'".');return r.slice(0)}},{key:"purge",value:function(e){if(!this._store.delete(e))throw new Error('There is no arrayBuffer stored with an id called "'+e+'".')}},{key:"slice",value:function(e,r,t){var n=this._store.get(e);if(void 0===n)throw new Error('There is no arrayBuffer stored with an id called "'+e+'".');return n.slice(r,null===t?n.byteLength:t)}},{key:"store",value:function(e,r){if(this._store.has(e))throw new Error('There is already an arrayBuffer stored with an id called "'+e+'".');this._store.set(e,r)}}]),t}());addEventListener("message",function(e){var r=e.data;try{if("clone"===r.action){var n=r.action,a=r.id,i=t.clone(a);postMessage({action:n,arrayBuffer:i,id:a},[i])}else if("purge"===r.action){var o=r.action,s=r.id;t.purge(s),postMessage({action:o,id:s})}else if("slice"===r.action){var c=r.action,f=r.begin,u=r.end,l=void 0===u?null:u,d=r.id,h=t.slice(d,f,l);postMessage({action:c,arrayBuffer:h,id:d},[h])}else if("store"===r.action){var v=r.action,y=r.arrayBuffer,g=r.id;t.store(g,y),postMessage({action:v,id:g})}}catch(e){postMessage({err:{message:e.message}})}})}();

@@ -14,3 +14,3 @@ {

"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-uglify": "^2.0.0",
"grunt-contrib-uglify": "^3.0.0",
"grunt-karma": "^2.0.0",

@@ -63,3 +63,3 @@ "grunt-sh": "^0.1.4",

"types": "build/es2015/module.d.ts",
"version": "1.0.1"
"version": "1.0.2"
}
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