6.7.0 - Alpha4 - 新增 JS 脚本工具 (run-scrapers.mjs)

This commit is contained in:
SuperMonster003
2025-09-09 17:24:48 +08:00
parent a997c7bbec
commit 9991ec3c28
56 changed files with 5167 additions and 752 deletions

11
.utils/utils/format.mjs Normal file
View File

@@ -0,0 +1,11 @@
// utils/format.mjs
/**
* @param {number | null} bytes
* @param {number} [fractionDigits=2]
*/
export function bytes2GiB(bytes, fractionDigits = 2) {
if (bytes == null) return null;
const gib = bytes / 1024 ** 3;
return `${gib.toFixed(fractionDigits)} GiB`;
}