@abstract-foundation/agw-client
Version:
Abstract Global Wallet Client SDK
14 lines • 579 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.replaceBigInts = void 0;
const replaceBigInts = (obj, replacer) => {
if (typeof obj === 'bigint')
return replacer(obj);
if (Array.isArray(obj))
return obj.map((x) => (0, exports.replaceBigInts)(x, replacer));
if (obj && typeof obj === 'object')
return Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, (0, exports.replaceBigInts)(v, replacer)]));
return obj;
};
exports.replaceBigInts = replaceBigInts;
//# sourceMappingURL=replaceBigInts.js.map