@lacspace/money 1.0.2 → 1.0.3

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.
Files changed (2) hide show
  1. package/README.md +13 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,12 +5,21 @@
5
5
  **Money without the floating-point bugs — integer cents, safe math, localized formatting.**
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/@lacspace/money?color=%2316a34a&label=npm)](https://www.npmjs.com/package/@lacspace/money)
8
+ [![minzipped](https://img.shields.io/bundlephobia/minzip/@lacspace/money?label=minzip)](https://bundlephobia.com/package/@lacspace/money)
9
+ [![types](https://img.shields.io/badge/types-included-blue)](https://www.npmjs.com/package/@lacspace/money)
8
10
  [![license](https://img.shields.io/npm/l/@lacspace/money?color=green)](https://github.com/lacspace/npm-packages/blob/main/LICENSE)
9
11
 
10
12
  </div>
11
13
 
12
14
  > `0.1 + 0.2 !== 0.3` — so never store money as a float. `@lacspace/money` keeps amounts as **integer minor units**, refuses to add different currencies, splits a bill without losing a cent, and formats with `Intl`. Tiny, typed, isomorphic.
13
15
 
16
+ - 🪙 **Integer minor units** — no floating-point cent bugs, ever
17
+ - 🧮 Currency-checked arithmetic — adding `USD` to `EUR` throws
18
+ - ➗ `allocate` / `split` distribute without losing a cent (remainder-preserving)
19
+ - 🌍 Localized `Intl` formatting · zero-decimal (JPY) & 3-decimal (BHD) currencies handled
20
+ - 🧊 Immutable — every operation returns a new `Money`
21
+ - ⚡ Zero dependencies · 🌍 isomorphic · 📦 ESM + CJS · fully typed
22
+
14
23
  ## Install
15
24
 
16
25
  ```bash
@@ -66,7 +75,7 @@ All operations return a new `Money` — instances are immutable.
66
75
 
67
76
  ## Licensing
68
77
 
69
- Free under the **[Lacspace Free Licence](https://lacspace.com/licenses/lacspace-free-1.0)** — permissive freedoms. Use it in personal and commercial projects at no cost; just keep the notice. See the **[Lacspace Licence Centre](https://lacspace.com/licenses)**.
78
+ Free under the **[Lacspace Free Licence](https://developer.lacspace.com/licenses/lacspace-free-1.0)** — permissive freedoms. Use it in personal and commercial projects at no cost; just keep the notice. See the **[Lacspace Licence Centre](https://lacspace.com/licenses)**.
70
79
 
71
80
  <!-- LACSPACE-DEV-PLATFORM -->
72
81
 
@@ -74,14 +83,14 @@ Free under the **[Lacspace Free Licence](https://lacspace.com/licenses/lacspace-
74
83
 
75
84
  ## The Lacspace Developer Platform
76
85
 
77
- `@lacspace/money` is part of **63 zero-dependency, isomorphic TypeScript packages** — one standard library for the modern web. Explore the ecosystem:
86
+ `@lacspace/money` is part of **80+ zero-dependency, isomorphic TypeScript packages** — one standard library for the modern web. Explore the ecosystem:
78
87
 
79
88
  - 📦 **This package, documented** — https://developer.lacspace.com/packages/money
80
- - 🗂️ **All 63 packages** — https://developer.lacspace.com/packages
89
+ - 🗂️ **All 80+ packages** — https://developer.lacspace.com/packages
81
90
  - 🧭 **Developer handbook** — guides & runnable recipes — https://developer.lacspace.com/handbook
82
91
  - 🧪 **Live playground** — run any package in your browser — https://developer.lacspace.com/playground
83
92
  - 🖥️ **Finished app templates** — https://templates.lacspace.com
84
93
  - 🚀 **Scaffold a full app** — `npm create lacspace-app@latest`
85
94
 
86
- Free under the **[Lacspace Free Licence](https://lacspace.com/licenses/lacspace-free-1.0)** — a permissive, free-to-use licence.
95
+ Free under the **[Lacspace Free Licence](https://developer.lacspace.com/licenses/lacspace-free-1.0)** — a permissive, free-to-use licence.
87
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lacspace/money",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Money done right — integer minor units (no floating-point cent bugs), currency-safe arithmetic, remainder-preserving allocation/split, and localized formatting via Intl. Zero-dependency, isomorphic.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",