Closed aaronhuggins closed 2 years ago
Similar to handling of number conversion to integer, BigInt should be handled. Currently, BigInt falls through all detection to be handled as a CBOR map.
import { decode, encode } from './mod.ts' const bigint = 101n const number = 100 const a = new Map<any, any>([ [bigint, bigint], [number, number] ]) const encoded = encode(a) const decoded = decode(encoded, null, { dictionary: 'map' }) console.log(decoded) // Output: Map { Map {} => Map {}, 100 => 100 }
This is also a prerequisite for proper round-trip of large integer values between CBOR implementations.
Finished in commit f4ebdf7177240065cb389d7f2fcdf60c45d7e4c0
Similar to handling of number conversion to integer, BigInt should be handled. Currently, BigInt falls through all detection to be handled as a CBOR map.
This is also a prerequisite for proper round-trip of large integer values between CBOR implementations.