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

@applitools/monitoring-commons

Package Overview
Dependencies
Maintainers
45
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/monitoring-commons - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

dist/cjs/monitoring-commons.d.ts

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

export function makeTiming({ parentPerformance, nowService, }?: {
export function makeTiming({ parentPerformance, nowService }?: {
parentPerformance?: undefined;

@@ -3,0 +3,0 @@ nowService?: (() => number) | undefined;

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

"use strict";
function makeTiming({ parentPerformance = undefined, nowService = Date.now, } = {}) {
'use strict';
function makeTiming({ parentPerformance = undefined, nowService = Date.now } = {}) {
const performance = parentPerformance || {};

@@ -13,4 +13,3 @@ /**

const start = nowService();
return f().then((v) => ((performance[name] = (performance[name] || 0) + nowService() - start), v), (v) => ((performance[name] = (performance[name] || 0) + nowService() - start),
Promise.reject(v)));
return f().then((v) => ((performance[name] = (performance[name] || 0) + nowService() - start), v), (v) => ((performance[name] = (performance[name] || 0) + nowService() - start), Promise.reject(v)));
}

@@ -17,0 +16,0 @@ /**

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

export function makeTiming({ parentPerformance, nowService, }?: {
export function makeTiming({ parentPerformance, nowService }?: {
parentPerformance?: undefined;

@@ -3,0 +3,0 @@ nowService?: (() => number) | undefined;

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

"use strict";
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
function makeTiming({ parentPerformance = undefined, nowService = Date.now, } = {}) {
function makeTiming({ parentPerformance = undefined, nowService = Date.now } = {}) {
const performance = parentPerformance || {};

@@ -14,4 +14,3 @@ /**

const start = nowService();
return f().then((v) => ((performance[name] = (performance[name] || 0) + nowService() - start), v), (v) => ((performance[name] = (performance[name] || 0) + nowService() - start),
Promise.reject(v)));
return f().then((v) => ((performance[name] = (performance[name] || 0) + nowService() - start), v), (v) => ((performance[name] = (performance[name] || 0) + nowService() - start), Promise.reject(v)));
}

@@ -18,0 +17,0 @@ /**

{
"name": "@applitools/monitoring-commons",
"version": "2.0.1",
"version": "2.0.2",
"description": "",

@@ -25,4 +25,3 @@ "main": "dist/cjs/monitoring-commons.js",

"test:mocha-mjs": "npm run build && mocha --require @babel/register --no-timeouts 'test/**/*.test.mjs'",
"eslint": "eslint '**/*.js'",
"prepublishOnly": "npm version patch"
"eslint": "eslint '**/*.js'"
},

@@ -57,3 +56,6 @@ "keywords": [

"typescript": "^5.1.6"
},
"dependencies": {
"@applitools/monitoring-commons": "^2.0.1"
}
}

@@ -1,8 +0,5 @@

"use strict";
'use strict'
function makeTiming({
parentPerformance = undefined,
nowService = Date.now,
} = {}) {
const performance = parentPerformance || {};
function makeTiming({parentPerformance = undefined, nowService = Date.now} = {}) {
const performance = parentPerformance || {}

@@ -17,13 +14,10 @@ /**

function timeItAsync(name, f) {
const start = nowService();
const start = nowService()
return f().then(
(v) => ((performance[name] = (performance[name] || 0) + nowService() - start), v),
(v) => (
(performance[name] = (performance[name] || 0) + nowService() - start), v
(performance[name] = (performance[name] || 0) + nowService() - start), Promise.reject(v)
),
(v) => (
(performance[name] = (performance[name] || 0) + nowService() - start),
Promise.reject(v)
),
);
)
}

@@ -37,6 +31,6 @@

function getTimeItCallback(name) {
const start = nowService();
const start = nowService()
return () => {
performance[name] = (performance[name] || 0) + nowService() - start;
};
performance[name] = (performance[name] || 0) + nowService() - start
}
}

@@ -52,12 +46,12 @@

function timeIt(name, f) {
const start = nowService();
const start = nowService()
try {
const ret = f();
const ret = f()
performance[name] = (performance[name] || 0) + nowService() - start;
performance[name] = (performance[name] || 0) + nowService() - start
return ret;
return ret
} catch (err) {
performance[name] = (performance[name] || 0) + nowService() - start;
throw err;
performance[name] = (performance[name] || 0) + nowService() - start
throw err
}

@@ -71,3 +65,3 @@ }

performance,
};
}
}

@@ -77,2 +71,2 @@

makeTiming,
};
}

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

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