Encode and parse data in the Concise Binary Object Representation (CBOR) data format (RFC8949).
NOTE
All new users and most existing users of these libraries should move to the cbor2 library. It is where most maintenance and support and all new features are happening.
Only catastrophic bugs will be fixed in these libraries going forward.
This is a monorepo that holds a few related packages:
- cbor: a node-centric CBOR processor
- cbor-web: the
cborpackage compiled for use on the web, including all of its non-optional dependencies - cbor-cli: a set of command-line tools for working with
the
cborpackage - Examples:
- webpack-demo: bundle
cborusing webpack - parcel-demo: bundle
cborusing parcel - browserify-demo: bundle
cborusing browserify - plain-demo: bundle
cborby just usingcbor-webdirectly
- webpack-demo: bundle
- Install with
pnpm install -r, see. The important thing (for example) is that thecbor-clipackage ends up depending on the local version ofcbor. - monorepo-wide scripts:
install-global(make available everywhere) orinstall-local(usenpxif you want to us it outside a package script) install all of the tooling that might be needed locally, but isn't needed on CIdeploy: build and deploycbor-weband all of the actionscoverage: run tests and report coverage; look incoverage/lcov-report/index.html.lint: run eslint over all projects
If you really need to get at a specific rev from GitHub, you can no longer do
npm install hildjj/node-cbor. Instead you need:
npm install https://gitpkg.now.sh/hildjj/node-cbor/packages/cbor?main
This project now only supports versions of Node that the Node team is currently supporting. Ava's support statement is what we will be using as well. Currently, that means Node 16+ is required. If you need to support an older version of Node (back to version 6), use cbor version 5.2.x, which will get nothing but security updates from here on out.