tianji/src/server/init.ts
2023-09-15 00:53:03 +08:00

7 lines
145 B
TypeScript

(BigInt.prototype as any).toJSON = function () {
const int = Number.parseInt(this.toString());
return int ?? this.toString();
};
export {};