Merge pull request #6468 from raphj/master

"base" parameter for big-integer
This commit is contained in:
Horiuchi_H
2015-11-02 13:38:26 +09:00
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -4,6 +4,9 @@
var noArgument = bigInt(),
numberArgument = bigInt( 93 ),
stringArgument = bigInt( "75643564363473453456342378564387956906736546456235345" ),
baseArgumentInt = bigInt( "101010", 2 ),
baseArgumentStr = bigInt( "101010", "2" ),
baseArgumentBi = bigInt( "101010", bigInt( 2 ) ),
bigIntArgument = bigInt( noArgument );
// method tests
@@ -111,4 +114,4 @@ isNumber = x.toJSNumber();
isString = x.toString();
isNumber = x.valueOf();
isNumber = x.valueOf();
+2 -2
View File
@@ -214,7 +214,7 @@ interface BigIntegerStatic {
/** Parse a Javascript number into a bigInt */
( number: number ): BigInteger;
/** Parse a string into a bigInt */
( string: string ): BigInteger;
( string: string, base?: string | number | BigInteger): BigInteger;
/** no-op */
( bigInt: BigInteger ): BigInteger;
}
@@ -223,4 +223,4 @@ declare var bigInt: BigIntegerStatic;
declare module "big-integer" {
export = bigInt;
}
}