Synchronous seralization/deserialization for dag-cbor nodes
Usage:
let cbor = let buffer = cborlet obj = cbor
With links
let buffer = cborlet obj = cborBuffer // true
require('dag-cbor-sync')([maxsize])
Optionally set the maximum size of the cbor node. Node's larger will throw an exception.
serialize(object)
Returns a buffer of the binary representation of the object.
deserialize(buffer)
Returns the native representation.
Note the link CID's will already be converted to buffers.