Package Exports
- cbor-web
- cbor-web/dist/cbor.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cbor-web) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cbor-web
This package bundles the cbor package for easy use on the web. The following packages are bundled in as well, to reduce the degree of difficulty:
MOVE TO CBOR2
NOTE
ALL users of this library should move to the cbor2 library. It is where most maintenance and support and all new features are happening. cbor2 works natively on the web and does not this set of work-arounds and dependencies.
Only catastrophic bugs will be fixed in this library going forward.
Examples
You can see cbor-web in action on the web here.
Ways to use this
- you can load this in a script tag, which puts a cborproperty on the window object:
<script src='https://unpkg.com/bignumber.js'></script> <!-- optional -->
<script src='https://unpkg.com/cbor-web'></script>- You can bundle this with parcel, webpack, browserify, etc.
- You can require('cbor-web')from node.js, but I wouldn't recommend that unless you're trying to use the exact same paths for backend and frontend codebases, for example.
- You can import cbor from 'cbor-web'in either node or in some web contexts. Caveats to using in node are the same as above, but someimes you might really want an ES6 module, and be willing to deal with the downsides. Note that as soon as Node 10 is no longer supported, the maincborpackage will work toward becoming a native ES6 module.