🐛 fix: handle bigint with json serialize helper
This commit is contained in:
5
src/helpers/characters/serializeBigInt.ts
Normal file
5
src/helpers/characters/serializeBigInt.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export const serializeBigInt = <T>(data: T): T => {
|
||||
return JSON.parse(
|
||||
JSON.stringify(data, (_, v) => (typeof v === "bigint" ? Number(v) : v)),
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user