node-cbor

Encode and decode CBOR documents, with both easy mode, streaming mode, and SAX-style evented mode.

MIT License

Downloads
2.6M
Stars
360
Committers
17
node-cbor - Diagnose null, preferMap Latest Release

Published by hildjj 9 months ago

  • #186
  • #187

Did not update dependencies, that is going to get harder and harder going forward since nofilter went ESM.

node-cbor - Fix null converter issue

Published by hildjj over 1 year ago

Passing in {tags: {1: null}} did not override built-in converter as the docs promised. This is now fixed.

node-cbor - Requires node16, adds SharedValue support

Published by hildjj over 1 year ago

Changed

  • Breaking: Node 16 now required.

Added

  • SharedValueEncoder, which implements value-sharing with tags 28 and 29
  • Typescript type definitions for cbor-web

Fixed

  • All dependencies brought up to date where possible. nofilter held back, pending switching to ESM.
node-cbor - Optionally prevent duplicate keys

Published by hildjj almost 3 years ago

New feature:

  • On decode, specify preventDuplicateKeys: true in the options to have the decoder throw an error if there are duplicate keys in a CBOR map. (See #161, thanks to @KubqoA)

Bug fixes:

  • Make react-native-cli work (See #162)
  • Update all dependencies
node-cbor - Fix MIN_SAFE_INTEGER

Published by hildjj about 3 years ago

Bugs:

  • Fixed #151: Update RFC link in readme
  • Fixed #155: The number -2^53 should be encoded as a float, not an integer

Minor:

  • Update dependencies
  • Linting updates

Features:

node-cbor -

Published by hildjj about 3 years ago

breaking: now requires node 12+
breaking: removed bigfloat and bigdecimal support. Moved to cbor-bigdecimal package
minor: upgrade to ava 4. Biggest issue was removal of .cb() tests in favor of promises, which added a p-event dependency.
minor: updated and improved typescript type definitions
minor: removed all uses of util and node-inspect-extracted from the library and dependents
minor: make all tests run on Windows, build steps run on Windows
minor: bring lint rules up to date

node-cbor -

Published by hildjj over 3 years ago

Works on Safari

node-cbor - Add omitUndefinedProperties, RFC 8746

Published by hildjj over 3 years ago

When encoding objects or Maps, and the option omitUndefinedProperties is given, omit properties whose value is `undefined. Also added partial support for RFC 8746.

node-cbor - Lint fixes found a few minor issues

Published by hildjj over 3 years ago

When migrating to a shared, more-comprehensive set of lint rules (see repo), I found a few very minor issues (e.g. places where I was using == and meant ===). Hopefully no impactful changes here.

node-cbor - cbor-web and a monorepo

Published by hildjj over 3 years ago

For most of you trying to use cbor on the web, you should now depend on cbor-web instead. It's pre-minified, batteries-included. If you are using some of the other pre-reqs that cbor-web does (buffer, process, etc.), then you can look at the examples in the repo to get ideas of how to include cbor directly.