@zero-library/common 2.2.2 → 2.2.3
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/index.cjs.js +0 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.esm.js +1 -12
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -1154,17 +1154,6 @@ function aesDecrypt(data, key) {
|
|
|
1154
1154
|
return null;
|
|
1155
1155
|
}
|
|
1156
1156
|
}
|
|
1157
|
-
var formatKB = (kbNum) => {
|
|
1158
|
-
if (!isNumber(kbNum)) return kbNum;
|
|
1159
|
-
const units = ["KB", "MB", "GB", "TB"];
|
|
1160
|
-
let size = kbNum;
|
|
1161
|
-
let index = 0;
|
|
1162
|
-
while (size >= 1024 && index < units.length - 1) {
|
|
1163
|
-
size /= 1024;
|
|
1164
|
-
index++;
|
|
1165
|
-
}
|
|
1166
|
-
return `${size.toFixed(2)} ${units[index]}`;
|
|
1167
|
-
};
|
|
1168
1157
|
function formatSize(value, options = {}) {
|
|
1169
1158
|
if (isNullOrUnDef(value) || !isNumberNoNaN(Number(value))) return value;
|
|
1170
1159
|
const UNIT_LIST = ["B", "KB", "MB", "GB", "TB", "PB"];
|
|
@@ -5880,7 +5869,6 @@ exports.emit = emit;
|
|
|
5880
5869
|
exports.emitToChild = emitToChild;
|
|
5881
5870
|
exports.executeScript = executeScript;
|
|
5882
5871
|
exports.formatDate = formatDate;
|
|
5883
|
-
exports.formatKB = formatKB;
|
|
5884
5872
|
exports.formatNumberWithCommas = formatNumberWithCommas;
|
|
5885
5873
|
exports.formatSize = formatSize;
|
|
5886
5874
|
exports.genNonDuplicateID = genNonDuplicateID;
|