Socket
Socket
Sign inDemoInstall

event-loop-spinner

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

event-loop-spinner - npm Package Compare versions

Comparing version 2.2.0 to 2.3.2

.circleci/config.yml

16

.prettierrc.json
{
"arrowParens": "always",
"singleQuote": true,
"trailingComma": "all",
"singleQuote": true
}
"overrides": [
{
"files": "*.json",
"options": {
"printWidth": 40,
"parser": "json",
"bracketSpacing": true,
"trailingComma": "none"
}
}
]
}

@@ -5,4 +5,5 @@ export declare class EventLoopSpinner {

constructor(thresholdMs?: number);
reset(): void;
isStarving(): boolean;
spin(): Promise<void>;
}

5

dist/event-loop-spinner.js

@@ -12,2 +12,5 @@ "use strict";

}
reset() {
this.afterLastSpin = Date.now();
}
isStarving() {

@@ -18,3 +21,3 @@ return Date.now() - this.afterLastSpin > this.thresholdMs;

return new Promise((resolve) => immediately(() => {
this.afterLastSpin = Date.now();
this.reset();
resolve();

@@ -21,0 +24,0 @@ }));

import { EventLoopSpinner } from './event-loop-spinner';
export { EventLoopSpinner };
export declare const eventLoopSpinner: EventLoopSpinner;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.eventLoopSpinner = void 0;
exports.eventLoopSpinner = exports.EventLoopSpinner = void 0;
const event_loop_spinner_1 = require("./event-loop-spinner");
Object.defineProperty(exports, "EventLoopSpinner", { enumerable: true, get: function () { return event_loop_spinner_1.EventLoopSpinner; } });
exports.eventLoopSpinner = new event_loop_spinner_1.EventLoopSpinner();
//# sourceMappingURL=index.js.map

@@ -13,2 +13,6 @@ const immediately =

public reset() {
this.afterLastSpin = Date.now();
}
public isStarving(): boolean {

@@ -21,3 +25,3 @@ return Date.now() - this.afterLastSpin > this.thresholdMs;

immediately(() => {
this.afterLastSpin = Date.now();
this.reset();
resolve();

@@ -24,0 +28,0 @@ }),

import { EventLoopSpinner } from './event-loop-spinner';
export { EventLoopSpinner };
export const eventLoopSpinner = new EventLoopSpinner();
{
"name": "event-loop-spinner",
"version": "2.2.0",
"description": "Tiny helper to prevent blocking Node.js event loop",

@@ -16,16 +15,16 @@ "main": "dist/index.js",

"dependencies": {
"tslib": "^2.1.0"
"tslib": "^2.6.3"
},
"devDependencies": {
"@types/jest": "^26.0.20",
"@types/node": "^10.17.4",
"@typescript-eslint/eslint-plugin": "^4.15.2",
"@typescript-eslint/parser": "^2.6.1",
"eslint": "^6.6.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-jest": "^24.1.5",
"jest": "^26.0.1",
"prettier": "^2.0.5",
"ts-jest": "^26.1.0",
"typescript": "~4.2.2"
"@types/jest": "^29.5.12",
"@types/node": "^20.14.5",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"eslint": "^8.56.0",
"jest": "^29.7.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.6.0",
"prettier": "^3.3.2",
"ts-jest": "^29.1.5",
"typescript": "^5.4.5"
},

@@ -37,3 +36,2 @@ "repository": {

"author": "snyk.io",
"license": "MIT",
"types": "dist/index.d.ts",

@@ -43,3 +41,5 @@ "bugs": {

},
"homepage": "https://github.com/snyk/eventloop-spinner#readme"
"homepage": "https://github.com/snyk/eventloop-spinner#readme",
"license": "Apache-2.0",
"version": "2.3.2"
}
{
"compilerOptions": {
"outDir": "./dist",
"target": "es2017",
"lib": [
"es2017"
],
"pretty": true,
"target": "es2019",
"module": "commonjs",
"sourceMap": true,
"declaration": true,
"sourceMap": true,
"pretty": true,
"importHelpers": true,
"strict": true,
"noImplicitAny": true,
"noImplicitAny": false,
"noUnusedLocals": true,

@@ -19,4 +15,4 @@ "noImplicitReturns": true

"include": [
"./lib/**/*"
"./lib/*"
]
}
}

Sorry, the diff of this file is not supported yet

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