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.0.0
to
1.1.0
lib/bigdecimal.mjs

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

+12
-12

@@ -218,3 +218,3 @@ /**

* precision and rounding mode by supplying an appropriate {@link
* MathContext} object to the operation. In either case, eight
* MathContext} object to the operation. In either case, eight
* <em>rounding modes</em> are provided for the control of rounding.

@@ -250,3 +250,3 @@ *

* called members of the same <i>cohort</i>. The {@link
* compareTo | natural order} of `BigDecimal`
* compareTo | natural order} of `BigDecimal`
* considers members of the same cohort to be equal to each other. In

@@ -256,3 +256,3 @@ * contrast, the {@link equals | equals} method requires both the

* hold. The results of methods like {@link scale} and {@link
* unscaledValue} will differ for numerically equal values with
* unscaledValue} will differ for numerically equal values with
* different representations.

@@ -287,3 +287,3 @@ *

* parameter, if the result is inexact but the rounding mode is {@link
* RoundingMode.UNNECESSARY | UNNECESSARY}, a RangeError will be thrown.
* RoundingMode.UNNECESSARY | UNNECESSARY}, a RangeError will be thrown.
*

@@ -350,3 +350,3 @@ * Besides a logical exact result, each arithmetic operation has a

* point motion operations. Scaling/rounding operations ({@link
* setScale} and {@link round}) return a
* setScale} and {@link round}) return a
* `BigDecimal` whose value is approximately (or exactly) equal

@@ -392,3 +392,3 @@ * to that of the operand, but whose scale or precision is the

* policy</em>. The rounding policy is called a {@link
* RoundingMode | rounding mode} for `BigDecimal` and called a
* RoundingMode | rounding mode} for `BigDecimal` and called a
* rounding-direction attribute in IEEE 754-2019. When the exact value

@@ -411,3 +411,3 @@ * is not representable, the rounding policy determines which of the

* possible range of scale/exponent and the {@link
* unscaledValue | unscaled value} has arbitrary precision. Instead,
* unscaledValue | unscaled value} has arbitrary precision. Instead,
* for the `BigDecimal` operations taking a `MathContext`

@@ -427,3 +427,3 @@ * parameter, if the `MathContext` has a nonzero precision, the

* attributes.
*
* `BigDecimal` arithmetic will most resemble IEEE 754

@@ -1039,3 +1039,3 @@ * decimal arithmetic if a `MathContext` corresponding to an

}
interface BigInterface {
interface BigDecimalConstructor {
(n: any, scale?: number, mc?: MathContext): BigDecimal;

@@ -1096,4 +1096,4 @@ new (n: any, scale?: number, mc?: MathContext): BigDecimal;

*/
export declare const Big: BigInterface;
interface MCInterface {
export declare const Big: BigDecimalConstructor;
interface MathContextConstructor {
(precision: number, roundingMode?: RoundingMode): MathContext;

@@ -1129,3 +1129,3 @@ new (precision: number, roundingMode?: RoundingMode): MathContext;

*/
export declare const MC: MCInterface;
export declare const MC: MathContextConstructor;
export {};
{
"name": "bigdecimal.js",
"version": "1.0.0",
"version": "1.1.0",
"description": "A BigDecimal implementation with native BigInts",
"main": "lib/index.js",
"exports": {
"import": "./lib/bigdecimal.mjs",
"require": "./lib/bigdecimal.js"
},
"main": "lib/bigdecimal.js",
"module": "lib/bigdecimal.mjs",
"scripts": {
"test": "mocha -t 100000 test/**/**/*.js",
"compile": "tsc",
"test": "mocha --require ts-node/register --require source-map-support/register -t 100000 test/**/**/*.js",
"coverage": "nyc --reporter=lcov npm run test",
"compile": " npm run compile:cjs && npm run compile:esm && npm run prepareESM",
"compile:esm": "tsc --module es2020 --outDir lib/esm",
"compile:cjs": "tsc --module commonjs --outDir lib",
"clean": "rimraf docs lib",

@@ -16,3 +24,5 @@ "predocs": "rimraf docs",

"benchmark": "node benchmarks/runBench.js",
"generate-test-files": "node util/generateTestFiles.js"
"generate-test-files": "node util/generateTestFiles.js",
"prepareESM": "mv lib/esm/bigdecimal.js lib/bigdecimal.mjs && rm -rf lib/esm",
"prepublish": "npm run compile"
},

@@ -29,6 +39,7 @@ "keywords": [

"files": [
"lib/**/*.js",
"lib/**/*.ts"
"lib/bigdecimal.js",
"lib/bigdecimal.mjs",
"lib/bigdecimal.d.ts"
],
"types": "lib/index.d.ts",
"types": "lib/bigdecimal.d.ts",
"repository": {

@@ -60,6 +71,21 @@ "type": "git",

"mocha": "~9.0.0",
"nyc": "^15.1.0",
"rimraf": "~3.0.2",
"source-map-support": "^0.5.19",
"ts-node": "^10.2.1",
"typedoc": "~0.20.36",
"typescript": "~4.2.4"
},
"nyc": {
"extension": [
".ts"
],
"exclude": [
"**/*.d.ts"
],
"reporter": [
"html"
],
"all": true
}
}
export { Big, RoundingMode, MC } from './bigdecimal';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MC = exports.RoundingMode = exports.Big = void 0;
var bigdecimal_1 = require("./bigdecimal");
Object.defineProperty(exports, "Big", { enumerable: true, get: function () { return bigdecimal_1.Big; } });
Object.defineProperty(exports, "RoundingMode", { enumerable: true, get: function () { return bigdecimal_1.RoundingMode; } });
Object.defineProperty(exports, "MC", { enumerable: true, get: function () { return bigdecimal_1.MC; } });
//# sourceMappingURL=index.js.map

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