@hexarc/bn.ts
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

BigNum in TypeScript

bn.ts

Version License Downloads Downloads

A modern big number implementation in TypeScript. It's based on bn.js but overhauled and refactored using modern JavaScript/TypeScript with type annotations out of the box.

Install with npm:

npm install --save @hexarc/bn.ts

Usage

import BN from "@hexarc/bn.ts";

const a = new BN("dead", 16);
const b = new BN("101010", 2);

const res = a.add(b);
console.log(res.toString(10));  // 57047

Compatibility

As this library is fully compatible with bn.js you can use it in the same way.

License

MIT

Package Sidebar

Install

npm i @hexarc/bn.ts

Weekly Downloads

2

Version

0.1.3

License

MIT

Unpacked Size

190 kB

Total Files

29

Last publish

Collaborators

  • shadeglare