You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

bigdecimal.js

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bigdecimal.js - npm Package Compare versions

Comparing version
1.1.2
to
1.1.3
+4
-4
lib/bigdecimal.d.ts

@@ -1054,13 +1054,13 @@ /**

*```javascript
* // Single unified constructor for multiple values
* const { Big } = require('bigdecimal.js');
*
* // Constructor accepts any value such as string and BigDecimal itself:
* // Construct from a string and clone it
* const x = Big('1.1111111111111111111111');
* const y = Big(x);
* const y = new Big(x); // you can also use 'new'
*
* // You can do arithmetic operations
* const z = x.add(y);
* console.log(z.toString()); // 2.2222222222222222222222
*
* // You can also construct a BigDecimal from a number or a BigInt:
* // You can also construct from a number or BigInt:
* const u = Big(1.1);

@@ -1067,0 +1067,0 @@ * const v = Big(2n);

{
"name": "bigdecimal.js",
"version": "1.1.2",
"version": "1.1.3",
"description": "A BigDecimal implementation with native BigInts",

@@ -5,0 +5,0 @@ "exports": {

@@ -30,7 +30,6 @@ # BigDecimal.js

```javascript
// Single unified constructor for multiple values
const { Big } = require('bigdecimal.js');
// Single constructor for all values
// Construct from a string and copy it
// Construct from a string and clone it
const x = Big('1.1111111111111111111111');

@@ -43,3 +42,2 @@ const y = new Big(x); // you can also use 'new'

// You can also construct from a number or BigInt:
const u = Big(1.1);

@@ -60,6 +58,7 @@ const v = Big(2n);

const res1 = x.divide(y, MC(3)); // MC is MathContext constructor that can be used without `new`
// MC is MathContext constructor that can be used with or without `new`
const res1 = x.divideWithMathContext(y, MC(3));
console.log(res1.toString()); // 0.333
const res2 = x.divide(y, new MC(3, RoundingMode.UP));
const res2 = x.divideWithMathContext(y, new MC(3, RoundingMode.UP));
console.log(res2.toString()); // 0.334

@@ -66,0 +65,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display