Skip to content

Commit 0de7551

Browse files
committed
fixed linting problems
1 parent 8cc0b7b commit 0de7551

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

BigInteger.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ var bigInt = (function (undefined) {
118118
}
119119

120120
BigInteger.prototype.add = function (v) {
121-
var value, n = parseValue(v);
121+
var n = parseValue(v);
122122
if (this.sign !== n.sign) {
123123
return this.subtract(n.negate());
124124
}
@@ -177,7 +177,7 @@ var bigInt = (function (undefined) {
177177
}
178178

179179
function subtractAny(a, b, sign) {
180-
var value, isSmall;
180+
var value;
181181
if (compareAbs(a, b) >= 0) {
182182
value = subtract(a,b);
183183
} else {
@@ -326,7 +326,7 @@ var bigInt = (function (undefined) {
326326
}
327327

328328
BigInteger.prototype.multiply = function (v) {
329-
var value, n = parseValue(v),
329+
var n = parseValue(v),
330330
a = this.value, b = n.value,
331331
sign = this.sign !== n.sign,
332332
abs;
@@ -826,23 +826,24 @@ var bigInt = (function (undefined) {
826826
BigInteger.prototype.modInv = function (n) {
827827
var t = bigInt.zero, newT = bigInt.one, r = parseValue(n), newR = this.abs(), q, lastT, lastR;
828828
while (!newR.equals(bigInt.zero)) {
829-
q = r.divide(newR);
830-
lastT = t;
831-
lastR = r;
832-
t = newT;
833-
r = newR;
834-
newT = lastT.subtract(q.multiply(newT));
835-
newR = lastR.subtract(q.multiply(newR));
829+
q = r.divide(newR);
830+
lastT = t;
831+
lastR = r;
832+
t = newT;
833+
r = newR;
834+
newT = lastT.subtract(q.multiply(newT));
835+
newR = lastR.subtract(q.multiply(newR));
836836
}
837837
if (!r.equals(1)) throw new Error(this.toString() + " and " + n.toString() + " are not co-prime");
838838
if (t.compare(0) === -1) {
839-
t = t.add(n);
839+
t = t.add(n);
840840
}
841841
if (this.isNegative()) {
842842
return t.negate();
843843
}
844844
return t;
845-
}
845+
};
846+
846847
SmallInteger.prototype.modInv = BigInteger.prototype.modInv;
847848

848849
BigInteger.prototype.next = function () {
@@ -1062,7 +1063,7 @@ var bigInt = (function (undefined) {
10621063
};
10631064

10641065
function parseBaseFromArray(digits, base, isNegative) {
1065-
var val = Integer[0], pow = Integer[1];
1066+
var val = Integer[0], pow = Integer[1], i;
10661067
for (i = digits.length - 1; i >= 0; i--) {
10671068
val = val.add(digits[i].times(pow));
10681069
pow = pow.times(base);
@@ -1215,7 +1216,7 @@ var bigInt = (function (undefined) {
12151216

12161217
Integer.fromArray = function (digits, base, isNegative) {
12171218
return parseBaseFromArray(digits.map(parseValue), parseValue(base || 10), isNegative);
1218-
}
1219+
};
12191220

12201221
return Integer;
12211222
})();

0 commit comments

Comments
 (0)