Comparing version 5.5.1 to 5.5.2
{ | ||
"name": "BigInt", | ||
"version": "5.5.1", | ||
"version": "5.5.2", | ||
"description": "Big Integer Library in pure Javascript by Leemon", | ||
@@ -5,0 +5,0 @@ "keywords": ["bigint", "leemon"], |
# Big Integer Library by Leemon | ||
Use typescript module definition and its [Documentation](http://evgenus.github.io/bigint-typescript-definitions/) for reference. | ||
This repo is thin wrapper for npm publishing. Current version is 5.5. | ||
@@ -4,0 +6,0 @@ |
@@ -1008,11 +1008,11 @@ // Vjeux: Customized bigInt2str and str2bigInt in order to accept custom base. | ||
//The array will always have at least one leading zero, unless base=-1. | ||
function str2bigInt(s,b,minSize) { | ||
var d, i, j, base, str, x, y, kk; | ||
if (typeof b === 'string') { | ||
base = b.length; | ||
str = b; | ||
} else { | ||
base = b; | ||
str = digitsStr; | ||
} | ||
function str2bigInt(s,b,minSize) { | ||
var d, i, j, base, str, x, y, kk; | ||
if (typeof b === 'string') { | ||
base = b.length; | ||
str = b; | ||
} else { | ||
base = b; | ||
str = digitsStr; | ||
} | ||
var k=s.length; | ||
@@ -1043,7 +1043,7 @@ if (base==-1) { //comma-separated list of array elements in decimal | ||
x=int2bigInt(0,base*k,0); | ||
for (i=0;i<k;i++) { | ||
d=str.indexOf(s.substring(i,i+1),0); | ||
for (i=0;i<k;i++) { | ||
d=str.indexOf(s.substring(i,i+1),0); | ||
// if (base<=36 && d>=36) //convert lowercase to uppercase if base<=36 | ||
// d-=26; | ||
if (d>=base || d<0) { //ignore illegal characters | ||
if (d>=base || d<0) { //ignore illegal characters | ||
continue; | ||
@@ -1109,11 +1109,11 @@ } | ||
//Base -1 prints the contents of the array representing the number. | ||
function bigInt2str(x,b) { | ||
var i,t,base,str,s=""; | ||
if (typeof b === 'string') { | ||
base = b.length; | ||
str = b; | ||
} else { | ||
base = b; | ||
str = digitsStr; | ||
} | ||
function bigInt2str(x,b) { | ||
var i,t,base,str,s=""; | ||
if (typeof b === 'string') { | ||
base = b.length; | ||
str = b; | ||
} else { | ||
base = b; | ||
str = digitsStr; | ||
} | ||
@@ -1120,0 +1120,0 @@ if (s6.length!=x.length) |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
59506
15
0