UNPKG

@abstract-foundation/agw-client

Version:
10 lines 409 B
export const replaceBigInts = (obj, replacer) => { if (typeof obj === 'bigint') return replacer(obj); if (Array.isArray(obj)) return obj.map((x) => replaceBigInts(x, replacer)); if (obj && typeof obj === 'object') return Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, replaceBigInts(v, replacer)])); return obj; }; //# sourceMappingURL=replaceBigInts.js.map