Closed tabcat closed 9 months ago
Ah ok, I imagined you'd do a decodeFirst
. I think I would prefer to not export the same options that are used in the encode and decode operations because I don't think it'd be healthy to introduce a way to be able to change those options. Maybe you could make a private objects and assemble or Object.assign
them for the exported form as separate from the ones used internally. Note that the tags
and typeEncoders
would also need to be nested copied so that they can't be messed with.
awesome, expect a semver-minor release soon with this, thanks!
These options are being exported so they can be used with cborg's API, specifically the
decodeFirst
andencodedLength
functions.Closes https://github.com/ipld/js-dag-cbor/issues/112