Socket
Socket
Sign inDemoInstall

bigint-serde

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bigint-serde

JS implementation of JSON serialization of BigInt and BigUint types from Rust num_bigint crate


Version published
Maintainers
1
Install size
6.56 kB
Created

Readme

Source

bigint-serde

JS implementation of JSON serialization of BigInt and BigUint types from Rust num-bigint crate

Build Status Coverage Status

Example

BigInt

const {
	toJSON,
	fromJSON,
} = require('bigint-serde');

console.log(toJSON(-123456789123456789n)); // → [-1,[2899336981,28744523]]
console.log(fromJSON([-1,[2899336981,28744523]])); // → -123456789123456789n

BigUint

const {
	toJSON,
	fromJSON,
} = require('bigint-serde/unsigned');

console.log(toJSON(123456789123456789n)); // → [2899336981,28744523]
console.log(fromJSON([2899336981,28744523])); // → 123456789123456789n

Install

yarn add bigint-serde

FAQs

Last updated on 14 Jun 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc