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

worker-timers

Package Overview
Dependencies
Maintainers
1
Versions
254
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

worker-timers - npm Package Compare versions

Comparing version 2.0.2 to 2.0.4

5

build/es2015/module.d.ts

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

export { clearInterval, clearTimeout, setInterval, setTimeout };
export declare const clearInterval: (id: number) => void;
export declare const clearTimeout: (id: number) => void;
export declare const setInterval: (func: Function, delay: number) => number;
export declare const setTimeout: (func: Function, delay: number) => number;

7

build/es2015/module.js

@@ -5,4 +5,7 @@ import { worker } from './worker/worker';

const url = URL.createObjectURL(blob);
const { clearInterval, clearTimeout, setInterval, setTimeout } = load(url);
export { clearInterval, clearTimeout, setInterval, setTimeout };
const workerTimers = load(url);
export const clearInterval = workerTimers.clearInterval;
export const clearTimeout = workerTimers.clearTimeout;
export const setInterval = workerTimers.setInterval;
export const setTimeout = workerTimers.setTimeout;
//# sourceMappingURL=module.js.map

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

export declare const worker: string;
export declare const worker = "!function(){\"use strict\";var a=new Map,b=new Map,c=function a(b,c,d,e){var f=\"performance\"in self?performance.now():Date.now();f>d?self.postMessage(e):b.set(c,setTimeout(a,d-f,b,c,d,e))};self.addEventListener(\"message\",function(d){var e=d.data,f=e.action,g=e.delay,h=e.id,i=e.now,j=e.type;if(\"clear\"===f){var k=void 0;\"interval\"===j?(k=a.get(h),void 0!==k&&(clearTimeout(k),a.delete(h))):\"timeout\"===j&&(k=b.get(h),void 0!==k&&(clearTimeout(k),b.delete(h)))}else if(\"set\"===f){var l=void 0,m=void 0;if(\"performance\"in self){var n=void 0,o=void 0;o=performance.now(),n=Math.max(0,o-i),g-=n,m=o}else m=Date.now();l=m+g,\"interval\"===j?a.set(h,setTimeout(c,g,a,h,l,{id:h,type:j})):\"timeout\"===j&&b.set(h,setTimeout(c,g,b,h,l,{id:h,type:j}))}})}();";
// 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 a(b,c,d,e){var f="performance"in self?performance.now():Date.now();f>d?self.postMessage(e):b.set(c,setTimeout(a,d-f,b,c,d,e))};self.addEventListener("message",function(d){var e=d.data,f=e.action,g=e.delay,h=e.id,i=e.now,j=e.type;if("clear"===f){var k=void 0;"interval"===j?(k=a.get(h),void 0!==k&&(clearTimeout(k),a.delete(h))):"timeout"===j&&(k=b.get(h),void 0!==k&&(clearTimeout(k),b.delete(h)))}else if("set"===f){var l=void 0,m=void 0;if("performance"in self){var n=void 0,o=void 0;o=performance.now(),n=Math.max(0,o-i),g-=n,m=o}else m=Date.now();l=m+g,"interval"===j?a.set(h,setTimeout(c,g,a,h,l,{id:h,type:j})):"timeout"===j&&b.set(h,setTimeout(c,g,b,h,l,{id:h,type:j}))}})}();';
//# sourceMappingURL=worker.js.map
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('worker-timers-broker')) :
typeof define === 'function' && define.amd ? define(['exports', 'worker-timers-broker'], factory) :
(factory((global.workerTimersWorker = global.workerTimersWorker || {}),global.workerTimersBroker));
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('worker-timers-broker')) :
typeof define === 'function' && define.amd ? define(['exports', 'worker-timers-broker'], factory) :
(factory((global.workerTimersWorker = global.workerTimersWorker || {}),global.workerTimersBroker));
}(this, (function (exports,workerTimersBroker) { 'use strict';
// tslint:disable-next-line:max-line-length
// tslint:disable-next-line:max-line-length
var worker = '!function(){"use strict";var a=new Map,b=new Map,c=function a(b,c,d,e){var f="performance"in self?performance.now():Date.now();f>d?self.postMessage(e):b.set(c,setTimeout(a,d-f,b,c,d,e))};self.addEventListener("message",function(d){var e=d.data,f=e.action,g=e.delay,h=e.id,i=e.now,j=e.type;if("clear"===f){var k=void 0;"interval"===j?(k=a.get(h),void 0!==k&&(clearTimeout(k),a.delete(h))):"timeout"===j&&(k=b.get(h),void 0!==k&&(clearTimeout(k),b.delete(h)))}else if("set"===f){var l=void 0,m=void 0;if("performance"in self){var n=void 0,o=void 0;o=performance.now(),n=Math.max(0,o-i),g-=n,m=o}else m=Date.now();l=m+g,"interval"===j?a.set(h,setTimeout(c,g,a,h,l,{id:h,type:j})):"timeout"===j&&b.set(h,setTimeout(c,g,b,h,l,{id:h,type:j}))}})}();';

@@ -12,9 +13,8 @@

var url = URL.createObjectURL(blob);
var workerTimers = workerTimersBroker.load(url);
var clearInterval = workerTimers.clearInterval;
var clearTimeout = workerTimers.clearTimeout;
var setInterval = workerTimers.setInterval;
var setTimeout = workerTimers.setTimeout;
var _load = workerTimersBroker.load(url);
var clearInterval = _load.clearInterval;
var clearTimeout = _load.clearTimeout;
var setInterval = _load.setInterval;
var setTimeout = _load.setTimeout;
exports.clearInterval = clearInterval;

@@ -21,0 +21,0 @@ exports.clearTimeout = clearTimeout;

@@ -68,3 +68,3 @@ {

"types": "build/es2015/module.d.ts",
"version": "2.0.2"
"version": "2.0.4"
}

@@ -8,4 +8,10 @@ import { worker } from './worker/worker';

const { clearInterval, clearTimeout, setInterval, setTimeout } = load(url);
const workerTimers = load(url);
export { clearInterval, clearTimeout, setInterval, setTimeout };
export const clearInterval = workerTimers.clearInterval;
export const clearTimeout = workerTimers.clearTimeout;
export const setInterval = workerTimers.setInterval;
export const setTimeout = workerTimers.setTimeout;

Sorry, the diff of this file is not supported yet

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