Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
a.toString();
JSBI.toNumber(a);
a instanceof JSBI;
JSBI.asIntN(64, JSBI.BigInt('42'));
public static clampToSafeIntegerRange(value: JSBI): number {
if (JSBI.greaterThan(value, this.NUMBER_MAX_SAFE_INTEGER)) {
return Number.MAX_SAFE_INTEGER;
}
if (JSBI.lessThan(value, this.NUMBER_MIN_SAFE_INTEGER)) {
return Number.MIN_SAFE_INTEGER;
}
return JSBI.toNumber(value);
}
public static isNegative(value: JSBI): boolean {
return JSBI.lessThan(value, JsbiSupport.ZERO);
}