New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

bigbit

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bigbit - npm Package Compare versions

Comparing version

to
1.3.1

{
"name": "bigbit",
"version": "1.3.0",
"version": "1.3.1",
"description": "Implementation of BigBit standard for numeric data type and character encoding",

@@ -40,9 +40,9 @@ "main": "index.js",

"babel-loader": "~8.0.0-beta.6",
"webpack": "~4.17.0",
"webpack-cli": "^3.1.0",
"big.js": "^5.1.2",
"browserify": "^16.2.3",
"ieee754": "^1.1.12",
"jasmine": "^3.2.0",
"browserify": "^16.2.3",
"nyc": "^13.1.0"
"nyc": "^13.3.0",
"webpack": "~4.17.0",
"webpack-cli": "^3.1.0"
},

@@ -49,0 +49,0 @@ "dependencies": {

@@ -198,2 +198,12 @@ const increase = require("../common/CyclicCounter");

function exponentPow(numStr, pow){
if(pow > 0){//positive
return numStr + '0'.repeat(pow);
}else{//negative
const index = (numStr.length + pow);
return numStr.substring(0,index) + "." + numStr.substring(index)
}
}
/**

@@ -258,3 +268,4 @@ * Convert HB bytes array to BigNumber.

if( exponentValue ){
decimalValue = decimalValue.multipliedBy( BigNumber(10).pow( exponentValue ) )
//decimalValue = decimalValue.multipliedBy( BigNumber(10).pow( exponentValue ) )
decimalValue = BigNumber(exponentPow ( decimalValue.toFixed(), exponentValue ) );
}

@@ -261,0 +272,0 @@

Sorry, the diff of this file is not supported yet