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

biggystring

Package Overview
Dependencies
Maintainers
0
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 4.2.0 to 4.2.1

2

lib/src/index.js

@@ -187,3 +187,3 @@ "use strict";

function toBns(n) {
let out = typeof n === 'number' ? n.toString() : n;
let out = typeof n === 'number' ? n.toString() : n.replace(/^\s+|\s+$/g, '');
// Handle scientific notation

@@ -190,0 +190,0 @@ const match = out.match(SCI_NOTATION_REGEX);

@@ -39,2 +39,8 @@ "use strict";

});
it('add with spaces', function () {
chai_1.assert.equal(index_1.add(' -2 ', ' '), '-2');
});
it('add with bad spaces', function () {
chai_1.assert.throws(() => index_1.add(' -2 1 ', ' '));
});
});

@@ -131,2 +137,11 @@ describe('sub', function () {

});
it('string number with spaces', function () {
chai_1.assert.equal(index_1.toBns(' 123 '), '123');
});
it('spaces', function () {
chai_1.assert.equal(index_1.toBns(' '), '');
});
it('2 spaces', function () {
chai_1.assert.equal(index_1.toBns(' '), '');
});
it('scientific notation: regular numbers', function () {

@@ -133,0 +148,0 @@ const numStr = '5e0';

{
"name": "biggystring",
"version": "4.2.0",
"version": "4.2.1",
"description": "Full floating point big number library using regular Javascript string",

@@ -5,0 +5,0 @@ "keywords": [

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