bigmathlib 0.0.1-security → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of bigmathlib might be problematic. Click here for more details.

package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 kristaclark55
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,5 +1,92 @@
1
- # Security holding package
2
-
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
4
-
5
- Please refer to www.npmjs.com/advisories?search=bigmathlib for more information.
1
+ # 🧮 bigmathlib (NPM Package)
2
+
3
+ **bigmathlib** is a lightweight and fast arbitrary-precision decimal math library for Node.js and browser environments.
4
+ It allows you to work with large numbers safely without losing precision — perfect for finance, blockchain, scientific computation, and any high-precision number operations.
5
+
6
+ ---
7
+
8
+ ## ✨ Features
9
+
10
+ - Arbitrary precision decimal arithmetic
11
+ - Supports add, subtract, multiply, divide, modulo, power, sqrt, comparison, rounding & formatting
12
+ - Configurable decimal places and rounding mode
13
+ - Zero dependency & highly optimized
14
+ - Works in **Node.js**, **Browser**, **TypeScript** environments
15
+
16
+ ---
17
+
18
+ ## 📦 Installation
19
+
20
+ ```bash
21
+ npm install bigmathlib
22
+ # or
23
+ yarn add bigmathlib
24
+ # or
25
+ pnpm add bigmathlib
26
+ ```
27
+
28
+ ---
29
+
30
+ ## 🚀 Usage
31
+
32
+ ```javascript
33
+ import Big from "bigmathlib";
34
+
35
+ const a = new Big("12345678901234567890.12345");
36
+ const b = new Big("10");
37
+
38
+ console.log(a.plus(b).toString()); // → "12345678901234567900.12345"
39
+ console.log(a.times(b).toString()); // → "123456789012345678901.2345"
40
+ console.log(a.div(b).toString()); // → precise division result
41
+ console.log(a.sqrt().toString()); // → square root with high precision
42
+ ```
43
+
44
+ ---
45
+
46
+ ## 🔧 Configuration
47
+
48
+ ```javascript
49
+ Big.DP = 50; // Decimal precision
50
+ Big.RM = Big.roundUp; // Rounding mode
51
+ ```
52
+
53
+ ---
54
+
55
+ ## API Overview
56
+
57
+ | Method | Description |
58
+ | ------------------------------------------------------------- | ------------------------- |
59
+ | `plus(y)` / `add(y)` | Addition |
60
+ | `minus(y)` / `sub(y)` | Subtraction |
61
+ | `times(y)` / `mul(y)` | Multiplication |
62
+ | `div(y)` | Division (with precision) |
63
+ | `mod(y)` | Modulo |
64
+ | `pow(n)` | Power (integer exponent) |
65
+ | `sqrt()` | Square root |
66
+ | `cmp(y)` | Compare numbers |
67
+ | `eq / gt / gte / lt / lte` | Comparisons |
68
+ | `toFixed / toPrecision / toExponential / toString / toNumber` | Format output |
69
+
70
+ ---
71
+
72
+ ## 📄 License
73
+
74
+ Copyright (c) 2025 kristaclark55
75
+
76
+ Permission is hereby granted, free of charge, to any person obtaining a copy
77
+ of this software and associated documentation files (the "Software"), to deal
78
+ in the Software without restriction, including without limitation the rights
79
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
80
+ copies of the Software, and to permit persons to whom the Software is
81
+ furnished to do so, subject to the following conditions:
82
+
83
+ The above copyright notice and this permission notice shall be included in all
84
+ copies or substantial portions of the Software.
85
+
86
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
87
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
88
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
89
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
90
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
91
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
92
+ SOFTWARE.