bigintjs

0.3.5 • Public • Published

BigInt Build Status Image

Enables working with integers beyond 53 bits (the upper limit of what JavaScript's Number type can accurately represent).

This is a pure JavaScript library, unlike other libraries that do the same thing.

Example

var bigint = require('bigintjs');
 
console.log(bigint('99999999999999999999999999999').add('1').toString());
// 100000000000000000000000000000
 
// Bitwise operations on a big number (JavaScript only supports up to 32 bits)
var value = bigint('0xFFFFFFFFFFFFFFFF').and('0xF0F0F0F0F0F0F0F0').shiftLeft(8);

Using this package

You can install this package with NPM:

npm install --save bigintjs

To be able to run this in a browser, you need to use a framework that supports CommonJS modules (for example: Browserify).

Readme

Keywords

none

Package Sidebar

Install

npm i bigintjs

Weekly Downloads

3

Version

0.3.5

License

MIT

Last publish

Collaborators

  • blixt