array-buffer-cache-worker
Advanced tools
Comparing version 2.1.4 to 2.1.5
@@ -1,3 +0,6 @@ | ||
(function (_classCallCheck,_createClass) { | ||
'use strict'; | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('babel-runtime/helpers/classCallCheck'), require('babel-runtime/helpers/createClass')) : | ||
typeof define === 'function' && define.amd ? define(['babel-runtime/helpers/classCallCheck', 'babel-runtime/helpers/createClass'], factory) : | ||
(factory(global._classCallCheck,global._createClass)); | ||
}(this, (function (_classCallCheck,_createClass) { 'use strict'; | ||
@@ -115,2 +118,2 @@ _classCallCheck = _classCallCheck && _classCallCheck.hasOwnProperty('default') ? _classCallCheck['default'] : _classCallCheck; | ||
}(_classCallCheck,_createClass)); | ||
}))); |
@@ -1,1 +0,1 @@ | ||
!function(e,r){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,r=r&&r.hasOwnProperty("default")?r.default:r;var s=new(function(){function s(){e(this,s),this._store=new Map}return r(s,[{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,s){var a=this._store.get(e);if(void 0===a)throw new Error('There is no arrayBuffer stored with an id called "'+e+'".');return a.slice(r,null===s?a.byteLength:s)}},{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)}}]),s}());addEventListener("message",function e(r,a){var t=a.data;try{if("clone"===t.method){var l=t.id,i=t.params.arrayBufferId,n=s.clone(i);r.postMessage({error:null,id:l,result:{arrayBuffer:n}},[n])}else if("connect"===t.method){var o=t.id,u=t.params.port;u.start(),u.addEventListener("message",e.bind(null,u)),r.postMessage({error:null,id:o,result:null})}else if("disconnect"===t.method){var d=t.id;t.params.port.close(),r.postMessage({error:null,id:d,result:null})}else if("purge"===t.method){var f=t.id,c=t.params.arrayBufferId;s.purge(c),r.postMessage({error:null,id:f,result:null})}else if("slice"===t.method){var h=t.id,p=t.params,y=p.arrayBufferId,v=p.begin,g=p.end,m=void 0===g?null:g,w=s.slice(y,v,m);r.postMessage({error:null,id:h,result:{arrayBuffer:w}},[w])}else if("store"===t.method){var B=t.id,M=t.params,_=M.arrayBuffer,E=M.arrayBufferId;s.store(E,_),r.postMessage({error:null,id:B,result:null})}}catch(e){r.postMessage({error:{message:e.message},id:t.id,result:null})}}.bind(null,self))}(_classCallCheck,_createClass); | ||
!function(e){function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}var t={};r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=0)}([function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t(1),a=new n.a,o=function e(r,t){var n=t.data;try{if("clone"===n.method){var o=n.id,s=n.params.arrayBufferId,i=a.clone(s);r.postMessage({error:null,id:o,result:{arrayBuffer:i}},[i])}else if("connect"===n.method){var l=n.id,u=n.params.port;u.start(),u.addEventListener("message",e.bind(null,u)),r.postMessage({error:null,id:l,result:null})}else if("disconnect"===n.method){var f=n.id,d=n.params.port;d.close(),r.postMessage({error:null,id:f,result:null})}else if("purge"===n.method){var c=n.id,p=n.params.arrayBufferId;a.purge(p),r.postMessage({error:null,id:c,result:null})}else if("slice"===n.method){var h=n.id,v=n.params,y=v.arrayBufferId,g=v.begin,m=v.end,w=void 0===m?null:m,b=a.slice(y,g,w);r.postMessage({error:null,id:h,result:{arrayBuffer:b}},[b])}else if("store"===n.method){var B=n.id,M=n.params,_=M.arrayBuffer,E=M.arrayBufferId;a.store(E,_),r.postMessage({error:null,id:B,result:null})}}catch(e){r.postMessage({error:{message:e.message},id:n.id,result:null})}};addEventListener("message",o.bind(null,self))},function(e,r,t){"use strict";function n(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}t.d(r,"a",function(){return o});var a=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}}(),o=function(){function e(){n(this,e),this._store=new Map}return a(e,[{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)}}]),e}()}]); |
@@ -6,5 +6,10 @@ { | ||
}, | ||
"dependencies": { | ||
"babel-runtime": "^6.26.0", | ||
"tslib": "^1.7.1" | ||
}, | ||
"description": "The worker which is used by the array-buffer-cache package.", | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.2", | ||
"babel-plugin-external-helpers": "^6.22.0", | ||
@@ -19,6 +24,6 @@ "babel-plugin-transform-runtime": "^6.23.0", | ||
"grunt-contrib-clean": "^1.0.0", | ||
"grunt-contrib-uglify": "^3.0.0", | ||
"grunt-karma": "^2.0.0", | ||
"grunt-sh": "^0.2.0", | ||
"grunt-tslint": "^5.0.0", | ||
"grunt-webpack": "^3.0.2", | ||
"gruntify-eslint": "^4.0.0", | ||
@@ -69,7 +74,3 @@ "husky": "^0.14.3", | ||
"types": "build/es2015/module.d.ts", | ||
"version": "2.1.4", | ||
"dependencies": { | ||
"babel-runtime": "^6.26.0", | ||
"tslib": "^1.7.1" | ||
} | ||
"version": "2.1.5" | ||
} |
42406
608
38