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

biggystring

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

biggystring - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

README.md

19

lib/index.es.js

@@ -137,11 +137,14 @@ /**

}
const pos = x.indexOf('.');
if (pos === -1) {
throw new Error('Invalid fixed point number');
let pos = x.indexOf('.');
if (pos !== -1) {
// Make sure there is only one '.'
let x2 = x.substr(0, pos) + x.substr(pos + 1);
const lastPos = x2.indexOf('.');
if (lastPos !== -1) {
throw new Error('Invalid fixed point number. Contains more than one decimal point');
}
} else {
pos = x.length - 1;
}
// Make sure there is only one '.'
const lastPos = x.indexOf('.');
if (lastPos !== pos) {
throw new Error('Invalid fixed point number. Contains more than one decimal point');
}
const addZeros = multiplier - (x.length - pos - 1);

@@ -148,0 +151,0 @@ if (addZeros < 0) {

@@ -141,11 +141,14 @@ 'use strict';

}
const pos = x.indexOf('.');
if (pos === -1) {
throw new Error('Invalid fixed point number');
let pos = x.indexOf('.');
if (pos !== -1) {
// Make sure there is only one '.'
let x2 = x.substr(0, pos) + x.substr(pos + 1);
const lastPos = x2.indexOf('.');
if (lastPos !== -1) {
throw new Error('Invalid fixed point number. Contains more than one decimal point');
}
} else {
pos = x.length - 1;
}
// Make sure there is only one '.'
const lastPos = x.indexOf('.');
if (lastPos !== pos) {
throw new Error('Invalid fixed point number. Contains more than one decimal point');
}
const addZeros = multiplier - (x.length - pos - 1);

@@ -152,0 +155,0 @@ if (addZeros < 0) {

{
"name": "biggystring",
"version": "1.0.4",
"version": "1.0.5",
"description": "Wrapper for bn.js to directly operate on strings as big numbers",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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