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

cbor-bigdecimal

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cbor-bigdecimal

Plugin for node-cbor to add BigDecimal and BigFloat support. Requires bignumber.js

  • 10.0.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

cbor-bignumber

This package adds suppot for BigDecimal and BigFloats to the cbor package, relying on bignumber.js.

Installation

npm install cbor cbor-bignumber

Usage

Before trying to encode or decode:

const cbor = require('cbor');
const bdec = require('cbor-bigdecimal');
bdec(cbor);

If you want to remove the added encoders and decoders:

cbor.reset();

If you need to access the same BigNumber class that cbor-bigdecimal is (e.g. because the class has been mangled by your compressor), it is available as bdec.BigNumber.

Supported Types

Decoding supports the following CBOR tag numbers:

TagGenerated Type
4bignumber
5bignumber

Keywords

FAQs

Package last updated on 27 Oct 2024

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