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

worker-timers-worker

Package Overview
Dependencies
Maintainers
1
Versions
168
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

worker-timers-worker - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

10

build/es5/bundle.js

@@ -1,8 +0,6 @@

(function (_Map) {
(function () {
'use strict';
_Map = _Map && _Map.hasOwnProperty('default') ? _Map['default'] : _Map;
var scheduledIntervalIdentifiers = new _Map();
var scheduledTimeoutIdentifiers = new _Map();
var scheduledIntervalIdentifiers = new Map();
var scheduledTimeoutIdentifiers = new Map();
var clearScheduledInterval = function clearScheduledInterval(timerId) {

@@ -111,2 +109,2 @@ var identifier = scheduledIntervalIdentifiers.get(timerId);

}(_Map));
}());

2

build/es5/worker.min.js

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

!function(e){"use strict";var t=new(e=e&&e.hasOwnProperty("default")?e.default:e),r=new e,i=function(e){var r=t.get(e);if(void 0===r)throw new Error('There is no interval scheduled with the given id "'+e+'".');clearTimeout(r),t.delete(e)},n=function(e){var t=r.get(e);if(void 0===t)throw new Error('There is no timeout scheduled with the given id "'+e+'".');clearTimeout(t),r.delete(e)},o=function(e,t){var r=void 0,i=void 0;if("performance"in self){var n=performance.now();r=n,i=e-Math.max(0,n-t)}else r=Date.now(),i=e;return{expected:r+i,remainingDelay:i}},a=function e(t,r,i,n){var o="performance"in self?performance.now():Date.now();o>i?postMessage({id:null,method:"call",params:{timerId:r,timerType:n}}):t.set(r,setTimeout(e,i-o,t,r,i,n))},s=function(e,r,i){var n=o(e,i),s=n.expected,d=n.remainingDelay;t.set(r,setTimeout(a,d,t,r,s,"interval"))},d=function(e,t,i){var n=o(e,i),s=n.expected,d=n.remainingDelay;r.set(t,setTimeout(a,d,r,t,s,"timeout"))};addEventListener("message",function(e){var t=e.data;try{if("clear"===t.method){var r=t.id,o=t.params,a=o.timerId,l=o.timerType;if("interval"===l)i(a),postMessage({error:null,id:r});else{if("timeout"!==l)throw new Error('The given type "'+l+'" is not supported');n(a),postMessage({error:null,id:r})}}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,f=m.timerId,v=m.timerType;if("interval"===v)s(u,f,p);else{if("timeout"!==v)throw new Error('The given type "'+v+'" is not supported');d(u,f,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}})}(_Map);
!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)},n=function(e,t){var r=void 0,i=void 0;if("performance"in self){var n=performance.now();r=n,i=e-Math.max(0,n-t)}else r=Date.now(),i=e;return{expected:r+i,remainingDelay:i}},o=function e(t,r,i,n){var o="performance"in self?performance.now():Date.now();o>i?postMessage({id:null,method:"call",params:{timerId:r,timerType:n}}):t.set(r,setTimeout(e,i-o,t,r,i,n))},a=function(t,r,i){var a=n(t,i),s=a.expected,d=a.remainingDelay;e.set(r,setTimeout(o,d,e,r,s,"interval"))},s=function(e,r,i){var a=n(e,i),s=a.expected,d=a.remainingDelay;t.set(r,setTimeout(o,d,t,r,s,"timeout"))};addEventListener("message",function(e){var t=e.data;try{if("clear"===t.method){var n=t.id,o=t.params,d=o.timerId,m=o.timerType;if("interval"===m)r(d),postMessage({error:null,id:n});else{if("timeout"!==m)throw new Error('The given type "'+m+'" is not supported');i(d),postMessage({error:null,id:n})}}else{if("set"!==t.method)throw new Error('The given method "'+t.method+'" is not supported');var l=t.params,u=l.delay,p=l.now,v=l.timerId,c=l.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})}})}();

@@ -67,6 +67,7 @@ {

"types": "build/es2015/module.d.ts",
"version": "4.0.2",
"version": "4.0.3",
"dependencies": {
"babel-runtime": "^6.26.0"
"babel-runtime": "^6.26.0",
"tslib": "^1.7.1"
}
}
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