Sha256: 6db21cb9bce8883e7e04618fd3db1d253488e1dc20a656cdb28948ab086b976a
Contents?: true
Size: 500 Bytes
Versions: 7
Compression:
Stored size: 500 Bytes
Contents
const serialized = "$$ babel internal serialized type" + Math.random(); function serialize(key, value) { if (typeof value !== "bigint") return value; return { [serialized]: "BigInt", value: value.toString(), }; } function revive(key, value) { if (!value || typeof value !== "object") return value; if (value[serialized] !== "BigInt") return value; return BigInt(value.value); } export default function (value) { return JSON.parse(JSON.stringify(value, serialize), revive); }
Version data entries
7 entries across 7 versions & 1 rubygems