Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(value, radix) {
if (typeof value === 'number') {
this._bi = BigInteger.fromInt(value);
} else if (value.constructor === BigInteger) {
this._bi = value;
} else if (value.constructor === BigNum) {
this._bi = value.bi;
} else {
this._bi = new BigInteger(value, radix);
}
}
function BigNum(value, radix) {
_classCallCheck(this, BigNum);
if (typeof value == 'number') {
this._bi = BigInteger.fromInt(value);
} else if (value.constructor == BigInteger) {
this._bi = value;
} else if (value.constructor == BigNum) {
this._bi = value.bi;
} else {
this._bi = new BigInteger(value, radix);
}
}