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

isoly

Package Overview
Dependencies
Maintainers
2
Versions
138
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isoly - npm Package Compare versions

Comparing version 2.0.8 to 2.0.9

18

dist/TimeSpan.js

@@ -22,3 +22,3 @@ export var TimeSpan;

function toHours(value, round) {
const result = (value.milliseconds ?? 0) / (60 * 60 * 1000) +
const result = (dateToMilliseconds(value) + (value.milliseconds ?? 0)) / (60 * 60 * 1000) +
(value.seconds ?? 0) / (60 * 60) +

@@ -31,3 +31,3 @@ (value.minutes ?? 0) / 60 +

function toMinutes(value, round) {
const result = (value.milliseconds ?? 0) / (60 * 1000) +
const result = (dateToMilliseconds(value) + (value.milliseconds ?? 0)) / (60 * 1000) +
(value.seconds ?? 0) / 60 +

@@ -40,3 +40,6 @@ (value.minutes ?? 0) +

function toSeconds(value, round) {
const result = (value.milliseconds ?? 0) / 1000 + (value.seconds ?? 0) + (value.minutes ?? 0) * 60 + (value.hours ?? 0) * 60 * 60;
const result = (dateToMilliseconds(value) + (value.milliseconds ?? 0)) / 1000 +
(value.seconds ?? 0) +
(value.minutes ?? 0) * 60 +
(value.hours ?? 0) * 60 * 60;
return performRound(result, round);

@@ -46,3 +49,4 @@ }

function toMilliseconds(value, round) {
const result = (value.milliseconds ?? 0) +
const result = dateToMilliseconds(value) +
(value.milliseconds ?? 0) +
(value.seconds ?? 0) * 1000 +

@@ -55,2 +59,8 @@ (value.minutes ?? 0) * 60 * 1000 +

})(TimeSpan || (TimeSpan = {}));
function dateToMilliseconds(span) {
const now = Date.UTC(0, 0);
const date = new Date(now);
const future = Date.UTC(date.getUTCFullYear() + (span.years ?? 0), date.getUTCMonth() + (span.months ?? 0), date.getUTCDate() + (span.days ?? 0), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());
return future.valueOf() - date.valueOf();
}
function performRound(value, round) {

@@ -57,0 +67,0 @@ return !round

{
"name": "isoly",
"version": "2.0.8",
"version": "2.0.9",
"description": "Datatypes and functions specified by ISO-standards.",

@@ -5,0 +5,0 @@ "author": "Utily Contributors",

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