@exodus/bigint

3.0.1 • Public • Published

@exodus/bigint

Immutable API wrapper for big integers, using BigInt if available in the JS environment and falling back to bn.js if it isn't

Usage

import BigIntWrapper from '@exodus/bigint'

const three = BigIntWrapper.wrap(3)
const five = BigIntWrapper.wrap(5)

// perform arithmetic
// see full API: ./src/native-bigint.js and ./src/__tests__/index.test.js
three.add(five).mul(three).div(five).pow(three).sub(five)

Readme

Keywords

none

Package Sidebar

Install

npm i @exodus/bigint

Weekly Downloads

3,214

Version

3.0.1

License

MIT

Unpacked Size

12.1 kB

Total Files

7

Last publish

Collaborators

  • joshuabot