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

cbor-bigdecimal

Package Overview
Dependencies
Maintainers
1
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.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
551
decreased by-9.67%
Maintainers
1
Weekly downloads
 
Created
Source

cbor-bignumber

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

MOVE TO CBOR2

NOTE

All new users and most existing users of this library should move to the cbor2 library. It is where most maintenance and support and all new features are happening. cbor2 has support for JavaScript bigints enabled by default.

Only catastrophic bugs will be fixed in this library going forward.

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 06 Nov 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