same version of bignumber
const cbor = require('cbor')
const BigNumber = cbor.BigNumber
;(async () => {
const pi3 = BigNumber(-Math.PI).pow(3)
console.log(pi3.toFixed())
const buffer = cbor.encode(pi3)
console.log(await cbor.comment(buffer))
const pi3decode = await cbor.decode(buffer)
console.log(pi3decode.toFixed())
console.log(pi3.isEqualTo(pi3decode))
})().catch(console.error)
no comments