Socket
Socket
Sign inDemoInstall

fun-dispatcher

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.3 to 1.2.4

2

dist/index.d.ts

@@ -8,3 +8,3 @@ interface Job {

private timeouts;
private timeoutsList;
private readonly timeoutsList;
private sortTimeouts;

@@ -11,0 +11,0 @@ private rescheduleNextTimeout;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Scheduler = void 0;
function sortByTimestamp(a, b) {

@@ -11,3 +12,3 @@ return a.expiry - b.expiry;

this.timeoutsList = {
plannedTriggerTime: 0
plannedTriggerTime: 0,
};

@@ -18,3 +19,3 @@ }

this.timeouts = this.timeouts
.filter(tm => {
.filter((tm) => {
const i = this.get(tm.key);

@@ -42,3 +43,3 @@ if (!i)

this.timeout();
}, delay);
}, delay).unref();
}

@@ -50,4 +51,4 @@ timeoutItem(item) {

this.delete(item.key);
if (typeof i.runner === 'function')
setImmediate(i.runner);
if (typeof i.runner === "function")
setImmediate(i.runner).unref();
}

@@ -83,3 +84,3 @@ timeout() {

this.sortTimeouts();
});
}).unref();
}

@@ -86,0 +87,0 @@ runNext() {

{
"name": "fun-dispatcher",
"version": "1.2.3",
"version": "1.2.4",
"description": "Tiny ES6 class to run functions after a given delay. Uses just on timer at any time and setImmediate to launch",

@@ -46,15 +46,15 @@ "types": "./dist/index.d.ts",

"devDependencies": {
"@babel/preset-env": "7.5.5",
"@babel/preset-typescript": "7.3.3",
"@types/jest": "24.0.18",
"@types/node": "12.7.2",
"@typescript-eslint/eslint-plugin": "2.0.0",
"@typescript-eslint/parser": "2.0.0",
"eslint": "6.2.2",
"eslint-config-prettier": "6.1.0",
"eslint-plugin-prettier": "3.1.0",
"jest": "25.0.0",
"jest-junit": "7.0.0",
"prettier": "1.18.2",
"typescript": "3.5.3"
"@babel/preset-env": "7.12.7",
"@babel/preset-typescript": "7.12.7",
"@types/jest": "26.0.17",
"@types/node": "12.12.31",
"@typescript-eslint/eslint-plugin": "4.9.1",
"@typescript-eslint/parser": "4.9.1",
"eslint": "7.15.0",
"eslint-config-prettier": "7.0.0",
"eslint-plugin-prettier": "3.2.0",
"jest": "26.6.3",
"jest-junit": "12.0.0",
"prettier": "2.2.1",
"typescript": "4.1.2"
},

@@ -61,0 +61,0 @@ "jest": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc