New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@valjoux/eta

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@valjoux/eta - npm Package Compare versions

Comparing version 0.0.2 to 0.0.4

19

dist/index.cjs.js

@@ -5,15 +5,4 @@ 'use strict';

const NUMERIC = 'numeric';
/**
*
* @type {Intl.DateTimeFormat}
*/
var formatTime = require('@valjoux/format-time');
const tf = new Intl.DateTimeFormat(undefined, {
hour: NUMERIC,
minute: NUMERIC,
second: NUMERIC,
hour12: false
});
const format = tf.format.bind(tf);
class Eta {

@@ -30,11 +19,11 @@ constructor() {

ini(msg = '') {
return `[${format(this.c)}] [Ini 0ms] ${msg}`;
return `[${formatTime.formatTime(this.c)}] [Ini 0ms] ${msg}`;
}
lap(msg = '') {
return `[${format(this.c)}] [Lap ${this.tick()}ms] ${msg}`;
return `[${formatTime.formatTime(this.c)}] [Lap ${this.tick()}ms] ${msg}`;
}
end(msg = '') {
return `[${format(this.c)}] [End ${this.tick()}ms] ${msg}`;
return `[${formatTime.formatTime(this.c)}] [End ${this.tick()}ms] ${msg}`;
}

@@ -41,0 +30,0 @@

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

const NUMERIC = 'numeric';
/**
*
* @type {Intl.DateTimeFormat}
*/
import { formatTime } from '@valjoux/format-time';
const tf = new Intl.DateTimeFormat(undefined, {
hour: NUMERIC,
minute: NUMERIC,
second: NUMERIC,
hour12: false
});
const format = tf.format.bind(tf);
class Eta {

@@ -25,11 +14,11 @@ constructor() {

ini(msg = '') {
return `[${format(this.c)}] [Ini 0ms] ${msg}`;
return `[${formatTime(this.c)}] [Ini 0ms] ${msg}`;
}
lap(msg = '') {
return `[${format(this.c)}] [Lap ${this.tick()}ms] ${msg}`;
return `[${formatTime(this.c)}] [Lap ${this.tick()}ms] ${msg}`;
}
end(msg = '') {
return `[${format(this.c)}] [End ${this.tick()}ms] ${msg}`;
return `[${formatTime(this.c)}] [End ${this.tick()}ms] ${msg}`;
}

@@ -36,0 +25,0 @@

{
"name": "@valjoux/eta",
"version": "0.0.2",
"version": "0.0.4",
"description": "timer",

@@ -18,3 +18,3 @@ "main": "dist/index.cjs.js",

"dependencies": {
"@valjoux/format-time": "^0.0.2"
"@valjoux/format-time": "^0.0.4"
},

@@ -36,4 +36,3 @@ "repository": {

},
"homepage": "https://github.com/hoyeungw/valjoux#readme",
"gitHead": "b6c4d50713975798d4bd2c31eb8914a43bb8f867"
"homepage": "https://github.com/hoyeungw/valjoux#readme"
}
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