hildjj / node-cbor

Encode and decode CBOR documents, with both easy mode, streaming mode, and SAX-style evented mode.
MIT License
356 stars 73 forks source link

Fix #186. Add preferMap to decode options #189

Closed hildjj closed 7 months ago

coveralls commented 7 months ago

Coverage Status

coverage: 100.0%. remained the same when pulling 596afd9980fb0dccae933a680cef1c951d11e9c7 on add-preferMap into 9733408f5082e9a2a4a533049b8611370c8aeb80 on main.

hildjj commented 7 months ago

Changing the default would be a pretty major breaking change.

hildjj commented 7 months ago

Fixed in 9.0.2

leppaott commented 2 weeks ago

I don't see this reflected on types so needs an extra casting on TS. https://github.com/hildjj/node-cbor/blob/main/packages/cbor/types/lib/decoder.d.ts#L150 should these be modified or generated. @hildjj

hildjj commented 2 weeks ago

I may fix this and do a release (not sure how it didn't make it into the types, apologies). However, please try cbor2 instead if you want preferWeb. cbor2 uses non-Buffer types always.