Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7c5513d

Browse files
committed
Update biginteger.js
1 parent 9417ab4 commit 7c5513d

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

‎biginteger.js‎

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,6 @@
4040
> var a = BigInteger.toJSValue("0b101010"); // Not completely useless...
4141
*/
4242

43-
// IE doesn't support Array.prototype.map
44-
if (!Array.prototype.map) {
45-
Array.prototype.map = function(fun /*, thisp*/) {
46-
var len = this.length >>> 0;
47-
if (typeof fun !== "function") {
48-
throw new TypeError();
49-
}
50-
51-
var res = new Array(len);
52-
var thisp = arguments[1];
53-
for (var i = 0; i < len; i++) {
54-
if (i in this) {
55-
res[i] = fun.call(thisp, this[i], i, this);
56-
}
57-
}
58-
59-
return res;
60-
};
61-
}
62-
6343
var CONSTRUCT = {}; // Unique token to call "private" version of constructor
6444

6545
/*
@@ -426,11 +406,6 @@ BigInteger.parse = function(s, base) {
426406
return new BigInteger(d, sign, CONSTRUCT);
427407
}
428408

429-
// Optimize base
430-
if (base === BigInteger_base) {
431-
return new BigInteger(digits.map(Number).reverse(), sign, CONSTRUCT);
432-
}
433-
434409
// Do the conversion
435410
var d = ZERO;
436411
base = BigInteger.small[base];
@@ -1641,4 +1616,4 @@ BigInteger.MAX_EXP = MAX_EXP;
16411616
})();
16421617

16431618
exports.BigInteger = BigInteger;
1644-
})(typeof exports !== 'undefined' ? exports : this);
1619+
})(typeof exports !== 'undefined' ? exports : this);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /