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

utilsac

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utilsac - npm Package Compare versions

Comparing version 10.5.4 to 10.5.5

2

package.json
{
"name": "utilsac",
"version": "10.5.4",
"version": "10.5.5",
"description": "Utility functions",

@@ -5,0 +5,0 @@ "type": "module",

@@ -224,17 +224,17 @@ export {

const timeFunction = function (callback) {
const timeFunction = function (callback, timer = Date) {
// executes callback and returns time elapsed in ms
const startTime = performance.now();
const startTime = timer.now();
callback();
const endTime = performance.now();
const endTime = timer.now();
return endTime - startTime;
};
const timePromise = function (promiseCreator) {
const timePromise = function (promiseCreator, timer = Date) {
/* returns a Promise that resolves with
the time elapsed for the promise to resolve and its value
executes promiseCreator and waits for it to resolve */
const startTime = performance.now();
const startTime = timer.now();
return promiseCreator().then(function (value) {
const endTime = performance.now();
const endTime = timer.now();
return {

@@ -241,0 +241,0 @@ timeElapsed: endTime - startTime,

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