Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
JSBigInt2(56);
const JSBIadd = JSBI.add;
JSBIadd(7, 8);
JSBI.add(a, b);
JSBI.subtract(a, b);
JSBI.multiply(a, b);
JSBI.divide(a, b);
JSBI.remainder(a, b);
JSBI.exponentiate(a, b);
const c = JSBI.unaryMinus(a);
const d = JSBI.bitwiseNot(a);
JSBI.leftShift(a, b);
JSBI.signedRightShift(a, b);
JSBI.bitwiseAnd(a, b);
JSBI.bitwiseOr(a, b);
JSBI.bitwiseXor(a, b);
JSBI.equal(a, b);
JSBI.notEqual(a, b);
JSBI.lessThan(a, b);
JSBI.lessThanOrEqual(a, b);
JSBI.greaterThan(a, b);
JSBI.greaterThanOrEqual(a, b);
JSBI.EQ(a, b);
JSBI.NE(a, b);
JSBI.LT(a, b);
JSBI.LE(a, b);
JSBI.GT(a, b);
JSBI.GE(a, b);
public static fromUnsignedBytes(bytes: Uint8Array): JSBI {
let magnitude: JSBI = JsbiSupport.ZERO;
for (let m = 0; m < bytes.length; m++) {
let byte = JSBI.BigInt(bytes[m]);
magnitude = JSBI.leftShift(magnitude, this.BITS_PER_BYTE);
magnitude = JSBI.bitwiseOr(magnitude, byte);
}
return magnitude;
}