Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cbor-web

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cbor-web

This package bundles the [cbor](../cbor) package for easy use on the web. The following packages are bundled in as well, to reduce the degree of difficulty:

  • 7.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19K
decreased by-7.38%
Maintainers
1
Weekly downloads
 
Created
Source

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:

In addition, if you want support for big decimal and big float numbers, you'll need your own version of bignumber.js. Decoding c4820a0a (hex) will give you a BigNumber if you have everything installed correctly.

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 cbor property 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 make cbor package will work toward becoming a native ES6 module.

FAQs

Package last updated on 22 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc