The jsbn library is a fast, portable (through browserify) implementation of large-number math in pure JavaScript, enabling public-key crypto and other applications on desktop and mobile browsers.
npm install node-jsbnThis is rzcoder node-rsa/utils version of jsbn (targeted for nodejs, allowing Buffer)
var BigInteger = require('node-jsbn');
var a = new BigInteger('91823918239182398123');
alert(a.bitLength()); // 67
returns the base-10 number as a string
returns a new BigInteger equal to the negation of bi
returns new BI of absolute value