This commit is contained in:
2024-05-31 14:29:29 +08:00
parent 8437bf1436
commit 8ea3ee98b1

View File

@@ -300,7 +300,7 @@ export function toJSON(obj: unknown) {
export function parseBigInt(str: string) {
const t = parseInt(str);
if (isNaN(t)) return t;
return Number.isSafeInteger(t) ? BigInt(str) : t;
return !Number.isSafeInteger(t) ? BigInt(str) : t;
}
export function isNumNaN(num: number | bigint) {