Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

BigInt

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

BigInt - npm Package Compare versions

Comparing version 5.5.1 to 5.5.2

2

package.json
{
"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)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc