forked from github/cordova-android
updated bundled node_modules
This commit is contained in:
+2364
File diff suppressed because it is too large
Load Diff
+19
-2
@@ -1038,14 +1038,31 @@ var bigInt = (function (undefined) {
|
||||
}
|
||||
var parseBase = function (text, base) {
|
||||
var length = text.length;
|
||||
var i;
|
||||
var absBase = Math.abs(base);
|
||||
for(var i = 0; i < length; i++) {
|
||||
var c = text[i].toLowerCase();
|
||||
if(c === "-") continue;
|
||||
if(/[a-z0-9]/.test(c)) {
|
||||
if(/[0-9]/.test(c) && +c >= absBase) {
|
||||
if(c === "1" && absBase === 1) continue;
|
||||
throw new Error(c + " is not a valid digit in base " + base + ".");
|
||||
} else if(c.charCodeAt(0) - 87 >= absBase) {
|
||||
throw new Error(c + " is not a valid digit in base " + base + ".");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (2 <= base && base <= 36) {
|
||||
if (length <= LOG_MAX_INT / Math.log(base)) {
|
||||
var result = parseInt(text, base);
|
||||
if(isNaN(result)) {
|
||||
throw new Error(c + " is not a valid digit in base " + base + ".");
|
||||
}
|
||||
return new SmallInteger(parseInt(text, base));
|
||||
}
|
||||
}
|
||||
base = parseValue(base);
|
||||
var digits = [];
|
||||
var i;
|
||||
var isNegative = text[0] === "-";
|
||||
for (i = isNegative ? 1 : 0; i < text.length; i++) {
|
||||
var c = text[i].toLowerCase(),
|
||||
@@ -1227,7 +1244,7 @@ if (typeof module !== "undefined" && module.hasOwnProperty("exports")) {
|
||||
}
|
||||
|
||||
//amd check
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
define( "big-integer", [], function() {
|
||||
return bigInt;
|
||||
});
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
@@ -211,7 +211,7 @@ Returns `true` if the number is prime, `false` otherwise.
|
||||
|
||||
#### `isProbablePrime([iterations])`
|
||||
|
||||
Returns `true` if the number is very likely to be positive, `false` otherwise.
|
||||
Returns `true` if the number is very likely to be prime, `false` otherwise.
|
||||
Argument is optional and determines the amount of iterations of the test (default: `5`). The more iterations, the lower chance of getting a false positive.
|
||||
This uses the [Fermat primality test](https://en.wikipedia.org/wiki/Fermat_primality_test).
|
||||
|
||||
@@ -517,4 +517,4 @@ There are performance benchmarks that can be viewed from the `benchmarks/index.h
|
||||
|
||||
## License
|
||||
|
||||
This project is public domain. For more details, read about the [Unlicense](http://unlicense.org/).
|
||||
This project is public domain. For more details, read about the [Unlicense](http://unlicense.org/).
|
||||
|
||||
-1
@@ -24,7 +24,6 @@
|
||||
"bower_components",
|
||||
"test",
|
||||
"coverage",
|
||||
"spec",
|
||||
"tests"
|
||||
]
|
||||
}
|
||||
|
||||
+19
-13
File diff suppressed because one or more lines are too long
+25
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"allowJs": true,
|
||||
"typeRoots": [
|
||||
"./"
|
||||
],
|
||||
"types": [
|
||||
"node"
|
||||
],
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"BigInteger.d.ts",
|
||||
"spec/tsDefinitions.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user