Comparing version 3.1.0 to 3.1.1
@@ -25,5 +25,14 @@ "use strict"; | ||
const f = (interval.h === 0) && (interval.i === 0) && (interval.s < 10) && (interval.f > 0) ? "." + padStart_1.default(interval.f.toString(), 3, "0") : ""; | ||
result.push(padStart_1.default(interval.h.toString(), 2, "0") + ":" + | ||
padStart_1.default(interval.i.toString(), 2, "0") + ":" + | ||
padStart_1.default(interval.s.toString(), 2, "0") + f); | ||
if (interval.h > 0) { | ||
result.push(padStart_1.default(interval.h.toString(), 2, "0") + ":" + | ||
padStart_1.default(interval.i.toString(), 2, "0") + ":" + | ||
padStart_1.default(interval.s.toString(), 2, "0") + f); | ||
} | ||
else if (interval.i > 0) { | ||
result.push(padStart_1.default(interval.i.toString(), 2, "0") + ":" + | ||
padStart_1.default(interval.s.toString(), 2, "0") + f); | ||
} | ||
else { | ||
result.push(padStart_1.default(interval.s.toString(), 2, "0") + f); | ||
} | ||
} | ||
@@ -30,0 +39,0 @@ } |
{ | ||
"name": "onix-core", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Onix library core", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -31,8 +31,18 @@ import padStart from 'lodash-es/padStart'; | ||
const f = (interval.h === 0) && (interval.i === 0) && (interval.s < 10) && (interval.f > 0) ? "." + padStart(interval.f.toString(), 3, "0") : ""; | ||
result.push( | ||
padStart(interval.h.toString(), 2, "0") + ":" + | ||
padStart(interval.i.toString(), 2, "0") + ":" + | ||
padStart(interval.s.toString(), 2, "0") + f | ||
); | ||
if (interval.h > 0) { | ||
result.push( | ||
padStart(interval.h.toString(), 2, "0") + ":" + | ||
padStart(interval.i.toString(), 2, "0") + ":" + | ||
padStart(interval.s.toString(), 2, "0") + f | ||
); | ||
} else if (interval.i > 0) { | ||
result.push( | ||
padStart(interval.i.toString(), 2, "0") + ":" + | ||
padStart(interval.s.toString(), 2, "0") + f | ||
); | ||
} else { | ||
result.push( | ||
padStart(interval.s.toString(), 2, "0") + f | ||
); | ||
} | ||
} | ||
@@ -39,0 +49,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115294
2172