worker-timers
Advanced tools
Comparing version
// tslint:disable-next-line:max-line-length | ||
// tslint:disable-next-line:max-line-length | ||
export const worker = `!function(){"use strict";var a=new Map,b=new Map,c=function(b){var c=a.get(b);if(void 0===c)throw new Error('There is no interval scheduled with the given id "'+b+'".');clearTimeout(c),a.delete(b)},d=function(a){var c=b.get(a);if(void 0===c)throw new Error('There is no timeout scheduled with the given id "'+a+'".');clearTimeout(c),b.delete(a)},e=function(a,b){var c=void 0;if("performance"in self){var d=performance.now();a-=Math.max(0,d-b),c=d}else c=Date.now();return{delay:a,expected:c+a}},f=function a(b,c,d,e){var f="performance"in self?performance.now():Date.now();f>d?postMessage({id:null,method:"call",params:{timerId:c,timerType:e}}):b.set(c,setTimeout(a,d-f,b,c,d,e))},g=function(b,c,d){var g=void 0,h=e(b,d);b=h.delay,g=h.expected,a.set(c,setTimeout(f,b,a,c,g,"interval"))},h=function(a,c,d){var g=void 0,h=e(a,d);a=h.delay,g=h.expected,b.set(c,setTimeout(f,a,b,c,g,"timeout"))};addEventListener("message",function(a){var b=a.data;try{if("clear"===b.method){var e=b.id,f=b.params,i=f.timerId,j=f.timerType;if("interval"===j)c(i),postMessage({error:null,id:e});else{if("timeout"!==j)throw new Error('The given type "'+j+'" is not supported');d(i),postMessage({error:null,id:e})}}else{if("set"!==b.method)throw new Error('The given method "'+b.method+'" is not supported');var k=b.params,l=k.delay,m=k.now,n=k.timerId,o=k.timerType;if("interval"===o)g(l,n,m);else{if("timeout"!==o)throw new Error('The given type "'+o+'" is not supported');h(l,n,m)}}}catch(a){postMessage({error:{message:a.message},id:b.id,result:null})}})}();`; | ||
export const worker = `!function(){"use strict";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id "'+t+'".');clearTimeout(r),e.delete(t)},i=function(e){var r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id "'+e+'".');clearTimeout(r),t.delete(e)},o=function(e,t){var r=void 0;if("performance"in self){var i=performance.now();e-=Math.max(0,i-t),r=i}else r=Date.now();return{delay:e,expected:r+e}},n=function e(t,r,i,o){var n="performance"in self?performance.now():Date.now();n>i?postMessage({id:null,method:"call",params:{timerId:r,timerType:o}}):t.set(r,setTimeout(e,i-n,t,r,i,o))},a=function(t,r,i){var a=void 0,s=o(t,i);t=s.delay,a=s.expected,e.set(r,setTimeout(n,t,e,r,a,"interval"))},s=function(e,r,i){var a=void 0,s=o(e,i);e=s.delay,a=s.expected,t.set(r,setTimeout(n,e,t,r,a,"timeout"))};addEventListener("message",function(e){var t=e.data;try{if("clear"===t.method){var o=t.id,n=t.params,d=n.timerId,l=n.timerType;if("interval"===l)r(d),postMessage({error:null,id:o});else{if("timeout"!==l)throw new Error('The given type "'+l+'" is not supported');i(d),postMessage({error:null,id:o})}}else{if("set"!==t.method)throw new Error('The given method "'+t.method+'" is not supported');var m=t.params,u=m.delay,p=m.now,v=m.timerId,c=m.timerType;if("interval"===c)a(u,v,p);else{if("timeout"!==c)throw new Error('The given type "'+c+'" is not supported');s(u,v,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}})}();`; | ||
//# sourceMappingURL=/users/chrisguttandin/repositories/worker-timers/node_modules/tsconfig-holy-grail/src/worker/worker.js.map |
@@ -9,3 +9,3 @@ (function (global, factory) { | ||
// tslint:disable-next-line:max-line-length | ||
var worker = "!function(){\"use strict\";var a=new Map,b=new Map,c=function(b){var c=a.get(b);if(void 0===c)throw new Error('There is no interval scheduled with the given id \"'+b+'\".');clearTimeout(c),a.delete(b)},d=function(a){var c=b.get(a);if(void 0===c)throw new Error('There is no timeout scheduled with the given id \"'+a+'\".');clearTimeout(c),b.delete(a)},e=function(a,b){var c=void 0;if(\"performance\"in self){var d=performance.now();a-=Math.max(0,d-b),c=d}else c=Date.now();return{delay:a,expected:c+a}},f=function a(b,c,d,e){var f=\"performance\"in self?performance.now():Date.now();f>d?postMessage({id:null,method:\"call\",params:{timerId:c,timerType:e}}):b.set(c,setTimeout(a,d-f,b,c,d,e))},g=function(b,c,d){var g=void 0,h=e(b,d);b=h.delay,g=h.expected,a.set(c,setTimeout(f,b,a,c,g,\"interval\"))},h=function(a,c,d){var g=void 0,h=e(a,d);a=h.delay,g=h.expected,b.set(c,setTimeout(f,a,b,c,g,\"timeout\"))};addEventListener(\"message\",function(a){var b=a.data;try{if(\"clear\"===b.method){var e=b.id,f=b.params,i=f.timerId,j=f.timerType;if(\"interval\"===j)c(i),postMessage({error:null,id:e});else{if(\"timeout\"!==j)throw new Error('The given type \"'+j+'\" is not supported');d(i),postMessage({error:null,id:e})}}else{if(\"set\"!==b.method)throw new Error('The given method \"'+b.method+'\" is not supported');var k=b.params,l=k.delay,m=k.now,n=k.timerId,o=k.timerType;if(\"interval\"===o)g(l,n,m);else{if(\"timeout\"!==o)throw new Error('The given type \"'+o+'\" is not supported');h(l,n,m)}}}catch(a){postMessage({error:{message:a.message},id:b.id,result:null})}})}();"; | ||
var worker = "!function(){\"use strict\";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id \"'+t+'\".');clearTimeout(r),e.delete(t)},i=function(e){var r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id \"'+e+'\".');clearTimeout(r),t.delete(e)},o=function(e,t){var r=void 0;if(\"performance\"in self){var i=performance.now();e-=Math.max(0,i-t),r=i}else r=Date.now();return{delay:e,expected:r+e}},n=function e(t,r,i,o){var n=\"performance\"in self?performance.now():Date.now();n>i?postMessage({id:null,method:\"call\",params:{timerId:r,timerType:o}}):t.set(r,setTimeout(e,i-n,t,r,i,o))},a=function(t,r,i){var a=void 0,s=o(t,i);t=s.delay,a=s.expected,e.set(r,setTimeout(n,t,e,r,a,\"interval\"))},s=function(e,r,i){var a=void 0,s=o(e,i);e=s.delay,a=s.expected,t.set(r,setTimeout(n,e,t,r,a,\"timeout\"))};addEventListener(\"message\",function(e){var t=e.data;try{if(\"clear\"===t.method){var o=t.id,n=t.params,d=n.timerId,l=n.timerType;if(\"interval\"===l)r(d),postMessage({error:null,id:o});else{if(\"timeout\"!==l)throw new Error('The given type \"'+l+'\" is not supported');i(d),postMessage({error:null,id:o})}}else{if(\"set\"!==t.method)throw new Error('The given method \"'+t.method+'\" is not supported');var m=t.params,u=m.delay,p=m.now,v=m.timerId,c=m.timerType;if(\"interval\"===c)a(u,v,p);else{if(\"timeout\"!==c)throw new Error('The given type \"'+c+'\" is not supported');s(u,v,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}})}();"; | ||
@@ -12,0 +12,0 @@ var blob = new Blob([worker], { type: 'application/javascript' }); |
@@ -157,3 +157,3 @@ (function (global, factory) { | ||
// tslint:disable-next-line:max-line-length | ||
var worker = "!function(){\"use strict\";var a=new Map,b=new Map,c=function(b){var c=a.get(b);if(void 0===c)throw new Error('There is no interval scheduled with the given id \"'+b+'\".');clearTimeout(c),a.delete(b)},d=function(a){var c=b.get(a);if(void 0===c)throw new Error('There is no timeout scheduled with the given id \"'+a+'\".');clearTimeout(c),b.delete(a)},e=function(a,b){var c=void 0;if(\"performance\"in self){var d=performance.now();a-=Math.max(0,d-b),c=d}else c=Date.now();return{delay:a,expected:c+a}},f=function a(b,c,d,e){var f=\"performance\"in self?performance.now():Date.now();f>d?postMessage({id:null,method:\"call\",params:{timerId:c,timerType:e}}):b.set(c,setTimeout(a,d-f,b,c,d,e))},g=function(b,c,d){var g=void 0,h=e(b,d);b=h.delay,g=h.expected,a.set(c,setTimeout(f,b,a,c,g,\"interval\"))},h=function(a,c,d){var g=void 0,h=e(a,d);a=h.delay,g=h.expected,b.set(c,setTimeout(f,a,b,c,g,\"timeout\"))};addEventListener(\"message\",function(a){var b=a.data;try{if(\"clear\"===b.method){var e=b.id,f=b.params,i=f.timerId,j=f.timerType;if(\"interval\"===j)c(i),postMessage({error:null,id:e});else{if(\"timeout\"!==j)throw new Error('The given type \"'+j+'\" is not supported');d(i),postMessage({error:null,id:e})}}else{if(\"set\"!==b.method)throw new Error('The given method \"'+b.method+'\" is not supported');var k=b.params,l=k.delay,m=k.now,n=k.timerId,o=k.timerType;if(\"interval\"===o)g(l,n,m);else{if(\"timeout\"!==o)throw new Error('The given type \"'+o+'\" is not supported');h(l,n,m)}}}catch(a){postMessage({error:{message:a.message},id:b.id,result:null})}})}();"; | ||
var worker = "!function(){\"use strict\";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id \"'+t+'\".');clearTimeout(r),e.delete(t)},i=function(e){var r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id \"'+e+'\".');clearTimeout(r),t.delete(e)},o=function(e,t){var r=void 0;if(\"performance\"in self){var i=performance.now();e-=Math.max(0,i-t),r=i}else r=Date.now();return{delay:e,expected:r+e}},n=function e(t,r,i,o){var n=\"performance\"in self?performance.now():Date.now();n>i?postMessage({id:null,method:\"call\",params:{timerId:r,timerType:o}}):t.set(r,setTimeout(e,i-n,t,r,i,o))},a=function(t,r,i){var a=void 0,s=o(t,i);t=s.delay,a=s.expected,e.set(r,setTimeout(n,t,e,r,a,\"interval\"))},s=function(e,r,i){var a=void 0,s=o(e,i);e=s.delay,a=s.expected,t.set(r,setTimeout(n,e,t,r,a,\"timeout\"))};addEventListener(\"message\",function(e){var t=e.data;try{if(\"clear\"===t.method){var o=t.id,n=t.params,d=n.timerId,l=n.timerType;if(\"interval\"===l)r(d),postMessage({error:null,id:o});else{if(\"timeout\"!==l)throw new Error('The given type \"'+l+'\" is not supported');i(d),postMessage({error:null,id:o})}}else{if(\"set\"!==t.method)throw new Error('The given method \"'+t.method+'\" is not supported');var m=t.params,u=m.delay,p=m.now,v=m.timerId,c=m.timerType;if(\"interval\"===c)a(u,v,p);else{if(\"timeout\"!==c)throw new Error('The given type \"'+c+'\" is not supported');s(u,v,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}})}();"; | ||
@@ -160,0 +160,0 @@ var blob = new Blob([worker], { type: 'application/javascript' }); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.workerTimers=e.workerTimers||{})}(this,function(e){"use strict";var t=function(e){return void 0!==e.method&&"call"===e.method},r=function(e){return null===e.error&&"number"==typeof e.id},i=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,n=function(e){for(var t=Math.round(Math.random()*i);e.has(t);)t=Math.round(Math.random()*i);return t},a=new Blob(['!function(){"use strict";var a=new Map,b=new Map,c=function(b){var c=a.get(b);if(void 0===c)throw new Error(\'There is no interval scheduled with the given id "\'+b+\'".\');clearTimeout(c),a.delete(b)},d=function(a){var c=b.get(a);if(void 0===c)throw new Error(\'There is no timeout scheduled with the given id "\'+a+\'".\');clearTimeout(c),b.delete(a)},e=function(a,b){var c=void 0;if("performance"in self){var d=performance.now();a-=Math.max(0,d-b),c=d}else c=Date.now();return{delay:a,expected:c+a}},f=function a(b,c,d,e){var f="performance"in self?performance.now():Date.now();f>d?postMessage({id:null,method:"call",params:{timerId:c,timerType:e}}):b.set(c,setTimeout(a,d-f,b,c,d,e))},g=function(b,c,d){var g=void 0,h=e(b,d);b=h.delay,g=h.expected,a.set(c,setTimeout(f,b,a,c,g,"interval"))},h=function(a,c,d){var g=void 0,h=e(a,d);a=h.delay,g=h.expected,b.set(c,setTimeout(f,a,b,c,g,"timeout"))};addEventListener("message",function(a){var b=a.data;try{if("clear"===b.method){var e=b.id,f=b.params,i=f.timerId,j=f.timerType;if("interval"===j)c(i),postMessage({error:null,id:e});else{if("timeout"!==j)throw new Error(\'The given type "\'+j+\'" is not supported\');d(i),postMessage({error:null,id:e})}}else{if("set"!==b.method)throw new Error(\'The given method "\'+b.method+\'" is not supported\');var k=b.params,l=k.delay,m=k.now,n=k.timerId,o=k.timerType;if("interval"===o)g(l,n,m);else{if("timeout"!==o)throw new Error(\'The given type "\'+o+\'" is not supported\');h(l,n,m)}}}catch(a){postMessage({error:{message:a.message},id:b.id,result:null})}})}();'],{type:"application/javascript"}),o=function(e){var i=new Map,a=new Map,o=new Map,d=new Worker(e);return d.addEventListener("message",function(e){var n=e.data;if(t(n)){var d=n.params,s=d.timerId;if("interval"===(f=d.timerType))if("number"==typeof(m=i.get(s))){if(void 0===(u=o.get(m))||u.timerId!==s||u.timerType!==f)throw new Error("The timer is in an undefined state.")}else{if(void 0===m)throw new Error("The timer is in an undefined state.");m()}else if("timeout"===f){var m=a.get(s);if("number"==typeof m){if(void 0===(u=o.get(m))||u.timerId!==s||u.timerType!==f)throw new Error("The timer is in an undefined state.")}else{if(void 0===m)throw new Error("The timer is in an undefined state.");m(),a.delete(s)}}}else{if(!r(n)){console.log(n);var l=n.error.message;throw new Error(l)}var c=n.id,u=o.get(c);if(void 0===u)throw new Error("The timer is in an undefined state.");var s=u.timerId,f=u.timerType;o.delete(c),"interval"===f?i.delete(s):a.delete(s)}}),{clearInterval:function(e){var t=n(o);o.set(t,{timerId:e,timerType:"interval"}),i.set(e,t),d.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:function(e){var t=n(o);o.set(t,{timerId:e,timerType:"timeout"}),a.set(e,t),d.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:function(e,t){var r=n(i);return i.set(r,function(){e(),"function"==typeof i.get(r)&&d.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:r,timerType:"interval"}})}),d.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:r,timerType:"interval"}}),r},setTimeout:function(e,t){var r=n(a);return a.set(r,e),d.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:r,timerType:"timeout"}}),r}}}(URL.createObjectURL(a)),d=o.clearInterval,s=o.clearTimeout,m=o.setInterval,l=o.setTimeout;e.clearInterval=d,e.clearTimeout=s,e.setInterval=m,e.setTimeout=l,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.workerTimers=e.workerTimers||{})}(this,function(e){"use strict";var t=function(e){return void 0!==e.method&&"call"===e.method},r=function(e){return null===e.error&&"number"==typeof e.id},i=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,n=function(e){for(var t=Math.round(Math.random()*i);e.has(t);)t=Math.round(Math.random()*i);return t},o=new Blob(['!function(){"use strict";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error(\'There is no interval scheduled with the given id "\'+t+\'".\');clearTimeout(r),e.delete(t)},i=function(e){var r=t.get(e);if(void 0===r)throw new Error(\'There is no timeout scheduled with the given id "\'+e+\'".\');clearTimeout(r),t.delete(e)},o=function(e,t){var r=void 0;if("performance"in self){var i=performance.now();e-=Math.max(0,i-t),r=i}else r=Date.now();return{delay:e,expected:r+e}},n=function e(t,r,i,o){var n="performance"in self?performance.now():Date.now();n>i?postMessage({id:null,method:"call",params:{timerId:r,timerType:o}}):t.set(r,setTimeout(e,i-n,t,r,i,o))},a=function(t,r,i){var a=void 0,s=o(t,i);t=s.delay,a=s.expected,e.set(r,setTimeout(n,t,e,r,a,"interval"))},s=function(e,r,i){var a=void 0,s=o(e,i);e=s.delay,a=s.expected,t.set(r,setTimeout(n,e,t,r,a,"timeout"))};addEventListener("message",function(e){var t=e.data;try{if("clear"===t.method){var o=t.id,n=t.params,d=n.timerId,l=n.timerType;if("interval"===l)r(d),postMessage({error:null,id:o});else{if("timeout"!==l)throw new Error(\'The given type "\'+l+\'" is not supported\');i(d),postMessage({error:null,id:o})}}else{if("set"!==t.method)throw new Error(\'The given method "\'+t.method+\'" is not supported\');var m=t.params,u=m.delay,p=m.now,v=m.timerId,c=m.timerType;if("interval"===c)a(u,v,p);else{if("timeout"!==c)throw new Error(\'The given type "\'+c+\'" is not supported\');s(u,v,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}})}();'],{type:"application/javascript"}),a=function(e){var i=new Map,o=new Map,a=new Map,s=new Worker(e);return s.addEventListener("message",function(e){var n=e.data;if(t(n)){var s=n.params,d=s.timerId;if("interval"===(f=s.timerType))if("number"==typeof(m=i.get(d))){if(void 0===(p=a.get(m))||p.timerId!==d||p.timerType!==f)throw new Error("The timer is in an undefined state.")}else{if(void 0===m)throw new Error("The timer is in an undefined state.");m()}else if("timeout"===f){var m=o.get(d);if("number"==typeof m){if(void 0===(p=a.get(m))||p.timerId!==d||p.timerType!==f)throw new Error("The timer is in an undefined state.")}else{if(void 0===m)throw new Error("The timer is in an undefined state.");m(),o.delete(d)}}}else{if(!r(n)){console.log(n);var l=n.error.message;throw new Error(l)}var u=n.id,p=a.get(u);if(void 0===p)throw new Error("The timer is in an undefined state.");var d=p.timerId,f=p.timerType;a.delete(u),"interval"===f?i.delete(d):o.delete(d)}}),{clearInterval:function(e){var t=n(a);a.set(t,{timerId:e,timerType:"interval"}),i.set(e,t),s.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:function(e){var t=n(a);a.set(t,{timerId:e,timerType:"timeout"}),o.set(e,t),s.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:function(e,t){var r=n(i);return i.set(r,function(){e(),"function"==typeof i.get(r)&&s.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:r,timerType:"interval"}})}),s.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:r,timerType:"interval"}}),r},setTimeout:function(e,t){var r=n(o);return o.set(r,e),s.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:r,timerType:"timeout"}}),r}}}(URL.createObjectURL(o)),s=a.clearInterval,d=a.clearTimeout,m=a.setInterval,l=a.setTimeout;e.clearInterval=s,e.clearTimeout=d,e.setInterval=m,e.setTimeout=l,Object.defineProperty(e,"__esModule",{value:!0})}); |
// tslint:disable-next-line:max-line-length | ||
// tslint:disable-next-line:max-line-length | ||
export var worker = "!function(){\"use strict\";var a=new Map,b=new Map,c=function(b){var c=a.get(b);if(void 0===c)throw new Error('There is no interval scheduled with the given id \"'+b+'\".');clearTimeout(c),a.delete(b)},d=function(a){var c=b.get(a);if(void 0===c)throw new Error('There is no timeout scheduled with the given id \"'+a+'\".');clearTimeout(c),b.delete(a)},e=function(a,b){var c=void 0;if(\"performance\"in self){var d=performance.now();a-=Math.max(0,d-b),c=d}else c=Date.now();return{delay:a,expected:c+a}},f=function a(b,c,d,e){var f=\"performance\"in self?performance.now():Date.now();f>d?postMessage({id:null,method:\"call\",params:{timerId:c,timerType:e}}):b.set(c,setTimeout(a,d-f,b,c,d,e))},g=function(b,c,d){var g=void 0,h=e(b,d);b=h.delay,g=h.expected,a.set(c,setTimeout(f,b,a,c,g,\"interval\"))},h=function(a,c,d){var g=void 0,h=e(a,d);a=h.delay,g=h.expected,b.set(c,setTimeout(f,a,b,c,g,\"timeout\"))};addEventListener(\"message\",function(a){var b=a.data;try{if(\"clear\"===b.method){var e=b.id,f=b.params,i=f.timerId,j=f.timerType;if(\"interval\"===j)c(i),postMessage({error:null,id:e});else{if(\"timeout\"!==j)throw new Error('The given type \"'+j+'\" is not supported');d(i),postMessage({error:null,id:e})}}else{if(\"set\"!==b.method)throw new Error('The given method \"'+b.method+'\" is not supported');var k=b.params,l=k.delay,m=k.now,n=k.timerId,o=k.timerType;if(\"interval\"===o)g(l,n,m);else{if(\"timeout\"!==o)throw new Error('The given type \"'+o+'\" is not supported');h(l,n,m)}}}catch(a){postMessage({error:{message:a.message},id:b.id,result:null})}})}();"; | ||
export var worker = "!function(){\"use strict\";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id \"'+t+'\".');clearTimeout(r),e.delete(t)},i=function(e){var r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id \"'+e+'\".');clearTimeout(r),t.delete(e)},o=function(e,t){var r=void 0;if(\"performance\"in self){var i=performance.now();e-=Math.max(0,i-t),r=i}else r=Date.now();return{delay:e,expected:r+e}},n=function e(t,r,i,o){var n=\"performance\"in self?performance.now():Date.now();n>i?postMessage({id:null,method:\"call\",params:{timerId:r,timerType:o}}):t.set(r,setTimeout(e,i-n,t,r,i,o))},a=function(t,r,i){var a=void 0,s=o(t,i);t=s.delay,a=s.expected,e.set(r,setTimeout(n,t,e,r,a,\"interval\"))},s=function(e,r,i){var a=void 0,s=o(e,i);e=s.delay,a=s.expected,t.set(r,setTimeout(n,e,t,r,a,\"timeout\"))};addEventListener(\"message\",function(e){var t=e.data;try{if(\"clear\"===t.method){var o=t.id,n=t.params,d=n.timerId,l=n.timerType;if(\"interval\"===l)r(d),postMessage({error:null,id:o});else{if(\"timeout\"!==l)throw new Error('The given type \"'+l+'\" is not supported');i(d),postMessage({error:null,id:o})}}else{if(\"set\"!==t.method)throw new Error('The given method \"'+t.method+'\" is not supported');var m=t.params,u=m.delay,p=m.now,v=m.timerId,c=m.timerType;if(\"interval\"===c)a(u,v,p);else{if(\"timeout\"!==c)throw new Error('The given type \"'+c+'\" is not supported');s(u,v,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}})}();"; | ||
//# sourceMappingURL=/users/chrisguttandin/repositories/worker-timers/node_modules/tsconfig-holy-grail/src/worker/worker.js.map |
@@ -76,3 +76,3 @@ { | ||
"types": "build/es2015/module.d.ts", | ||
"version": "4.0.4" | ||
"version": "4.0.5" | ||
} |
// tslint:disable-next-line:max-line-length | ||
export const worker = `!function(){"use strict";var a=new Map,b=new Map,c=function(b){var c=a.get(b);if(void 0===c)throw new Error('There is no interval scheduled with the given id "'+b+'".');clearTimeout(c),a.delete(b)},d=function(a){var c=b.get(a);if(void 0===c)throw new Error('There is no timeout scheduled with the given id "'+a+'".');clearTimeout(c),b.delete(a)},e=function(a,b){var c=void 0;if("performance"in self){var d=performance.now();a-=Math.max(0,d-b),c=d}else c=Date.now();return{delay:a,expected:c+a}},f=function a(b,c,d,e){var f="performance"in self?performance.now():Date.now();f>d?postMessage({id:null,method:"call",params:{timerId:c,timerType:e}}):b.set(c,setTimeout(a,d-f,b,c,d,e))},g=function(b,c,d){var g=void 0,h=e(b,d);b=h.delay,g=h.expected,a.set(c,setTimeout(f,b,a,c,g,"interval"))},h=function(a,c,d){var g=void 0,h=e(a,d);a=h.delay,g=h.expected,b.set(c,setTimeout(f,a,b,c,g,"timeout"))};addEventListener("message",function(a){var b=a.data;try{if("clear"===b.method){var e=b.id,f=b.params,i=f.timerId,j=f.timerType;if("interval"===j)c(i),postMessage({error:null,id:e});else{if("timeout"!==j)throw new Error('The given type "'+j+'" is not supported');d(i),postMessage({error:null,id:e})}}else{if("set"!==b.method)throw new Error('The given method "'+b.method+'" is not supported');var k=b.params,l=k.delay,m=k.now,n=k.timerId,o=k.timerType;if("interval"===o)g(l,n,m);else{if("timeout"!==o)throw new Error('The given type "'+o+'" is not supported');h(l,n,m)}}}catch(a){postMessage({error:{message:a.message},id:b.id,result:null})}})}();`; | ||
export const worker = `!function(){"use strict";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id "'+t+'".');clearTimeout(r),e.delete(t)},i=function(e){var r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id "'+e+'".');clearTimeout(r),t.delete(e)},o=function(e,t){var r=void 0;if("performance"in self){var i=performance.now();e-=Math.max(0,i-t),r=i}else r=Date.now();return{delay:e,expected:r+e}},n=function e(t,r,i,o){var n="performance"in self?performance.now():Date.now();n>i?postMessage({id:null,method:"call",params:{timerId:r,timerType:o}}):t.set(r,setTimeout(e,i-n,t,r,i,o))},a=function(t,r,i){var a=void 0,s=o(t,i);t=s.delay,a=s.expected,e.set(r,setTimeout(n,t,e,r,a,"interval"))},s=function(e,r,i){var a=void 0,s=o(e,i);e=s.delay,a=s.expected,t.set(r,setTimeout(n,e,t,r,a,"timeout"))};addEventListener("message",function(e){var t=e.data;try{if("clear"===t.method){var o=t.id,n=t.params,d=n.timerId,l=n.timerType;if("interval"===l)r(d),postMessage({error:null,id:o});else{if("timeout"!==l)throw new Error('The given type "'+l+'" is not supported');i(d),postMessage({error:null,id:o})}}else{if("set"!==t.method)throw new Error('The given method "'+t.method+'" is not supported');var m=t.params,u=m.delay,p=m.now,v=m.timerId,c=m.timerType;if("interval"===c)a(u,v,p);else{if("timeout"!==c)throw new Error('The given type "'+c+'" is not supported');s(u,v,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}})}();`; |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package