@dpuse/dpuse-shared 1.0.217 → 1.0.218
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dpuse-shared.es.js +10 -10
- package/dist/dpuse-shared.es.js.map +1 -1
- package/package.json +4 -4
package/dist/dpuse-shared.es.js
CHANGED
|
@@ -2809,10 +2809,10 @@ var Qt = /* @__PURE__ */ new Map([
|
|
|
2809
2809
|
["millisecond", 1]
|
|
2810
2810
|
], $t = [
|
|
2811
2811
|
["byte", 1],
|
|
2812
|
-
["
|
|
2813
|
-
["
|
|
2814
|
-
["
|
|
2815
|
-
["
|
|
2812
|
+
["KiB", 1024],
|
|
2813
|
+
["MiB", 1048576],
|
|
2814
|
+
["GiB", 1073741824],
|
|
2815
|
+
["TiB", 1099511627776]
|
|
2816
2816
|
], en = /* @__PURE__ */ new Map(), tn = /* @__PURE__ */ new Map();
|
|
2817
2817
|
function nn(e, t = 2, n = t, r = Z) {
|
|
2818
2818
|
return e == null ? "" : $(r, {
|
|
@@ -2835,13 +2835,13 @@ function an(e, t = 1, n = Z) {
|
|
|
2835
2835
|
}
|
|
2836
2836
|
function on(e, t = 1, n = Z) {
|
|
2837
2837
|
if (e == null || !Number.isFinite(e)) return "";
|
|
2838
|
-
let [r, i] = $t.find(([, n]) => hn(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["
|
|
2839
|
-
return $(n, {
|
|
2840
|
-
maximumFractionDigits:
|
|
2838
|
+
let [r, i] = $t.find(([, n]) => hn(Math.abs(e) / n, n === 1 ? 0 : t) < 1024) ?? ["TiB", 1099511627776];
|
|
2839
|
+
return i === 1 ? $(n, {
|
|
2840
|
+
maximumFractionDigits: 0,
|
|
2841
2841
|
style: "unit",
|
|
2842
|
-
unit:
|
|
2843
|
-
unitDisplay:
|
|
2844
|
-
}).format(e / i)
|
|
2842
|
+
unit: "byte",
|
|
2843
|
+
unitDisplay: "long"
|
|
2844
|
+
}).format(e) : `${$(n, { maximumFractionDigits: t }).format(e / i)} ${r}`;
|
|
2845
2845
|
}
|
|
2846
2846
|
function sn(e, t = "millisecond", n = Z) {
|
|
2847
2847
|
if (e == null || !Number.isFinite(e)) return "";
|