fix: compatibility bigint

This commit is contained in:
pk5ls20 committed 2024-10-27 10:50:48 +08:00
1 parent 4072339d70
commit c67fad789e
2 files changed
+12 -5

No files matched your search

+6
View File
@@ -239,3 +239,9 @@ export function calcQQLevel(level?: QQLevel) {
const { crownNum, sunNum, moonNum, starNum } = level;
return crownNum * 64 + sunNum * 16 + moonNum * 4 + starNum;
}
export function stringifyWithBigInt(obj: any) {
return JSON.stringify(obj, (key, value) =>
typeof value === 'bigint' ? value.toString() : value
);
}