subunit-money 2.1.0 → 2.1.1
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.
- package/README.md +6 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -228,6 +228,12 @@ const loaded = new Money('USD', row.price) // Works perfectly
|
|
|
228
228
|
|
|
229
229
|
Use `toNumber()` only when you explicitly need numeric calculations.
|
|
230
230
|
|
|
231
|
+
## Choosing the Right Money Library
|
|
232
|
+
|
|
233
|
+
**subunit-money** sits between currency.js (pragmatic but imprecise) and dinero.js (precise but ceremony-heavy). If you want BigInt precision with method-chaining ergonomics, and you're onboard with banker's rounding as the sensible default, this is your library.
|
|
234
|
+
|
|
235
|
+
See **[CHOOSING-A-MONEY-LIBRARY.md](./CHOOSING-A-MONEY-LIBRARY.md)** for a detailed comparison of JavaScript money/precision libraries.
|
|
236
|
+
|
|
231
237
|
## Requirements
|
|
232
238
|
|
|
233
239
|
- Node.js 18+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "subunit-money",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "A type-safe value object for monetary amounts with currency conversion support",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^20.0.0",
|
|
54
|
+
"fast-check": "^4.5.3",
|
|
54
55
|
"tsx": "^4.0.0",
|
|
55
56
|
"typescript": "^5.0.0"
|
|
56
57
|
}
|