@isdk/bigint
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@isdk/bigint

The BigInt Package provides a unified interface for performing large integer operations, which are fundamental to implementing cryptographic algorithms. The library wraps the bn.js library and native BigInt class. If native BigInt is available, it'll use it first. This enables users to take advantage of the best available implementation on their platform for improved performance.

The operator method prefix i: perform operation in-place, storing the result in the host object (on which the method was invoked). Might be used to avoid number allocation costs. eg,

import BigInteger from '@isdk/bigint'
const a = new BigInteger(9)
const b = new BigInteger(6)
// perform addition on `a` and `b`, storing the result in `a`
a.iadd(b)
console.log(a.toString()) // prints "15"

Credit

Package Sidebar

Install

npm i @isdk/bigint

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

173 kB

Total Files

30

Last publish

Collaborators

  • isdk