Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: George Lemon <[email protected]>
  • Loading branch information
georgelemon committed Aug 26, 2023
1 parent 55ab417 commit 8d92215
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
Nim library to make working with money safer, easier and fun!
> If I had a dime for every time I've seen someone use FLOAT to store currency, I'd have $999.997634 -- Bill Karwin
This library is inspired from [moneyphp/money](https://github.com/moneyphp/money).

## 😍 Key Features
- Framework agnostic
Expand Down Expand Up @@ -49,23 +48,38 @@ assert x == 300.EUR # EUR 3.00
assert x + y > y # EUR 3.00 > EUR 1.50
```

```nim
var x = fmt("100")
assert $(x - fmt(50)) == "EUR 0.50"
```

### Comparisons
Comparing `x` to `y` is easy!

```nim
var x = newMoney("100") # EUR 1.00
var y = newMoney("150") # EUR 1.50
assert x <= y
assert fmt("2500") <= fmt("2590") # 25.00 <= 25.90
var
x = 100.EUR
y = 150.EUR
assert x == 100.EUR
assert x < y
assert x >= 99.EUR
assert x != 100.USD
assert y > x
assert y >= 149.EUR
```

### Cart Example
[Dummy cart example available in `/tests`](https://github.com/supranim/money/blob/main/tests/test1.nim)

### ❤ Contributions & Support
- 🐛 Found a bug? [Create a new Issue](https://github.com/supranim/money/issues)
- 👋 Wanna help? [Fork it!](https://github.com/supranim/money/fork)
- 😎 [Get €20 in cloud credits from Hetzner](https://hetzner.cloud/?ref=Hm0mYGM9NxZ4)
- 🥰 [Donate via PayPal address](https://www.paypal.com/donate/?hosted_button_id=RJK3ZTDWPL55C)

This library is inspired from [moneyphp/money](https://github.com/moneyphp/money).

### 🎩 License
Money | MIT license. [Made by Humans from OpenPeeps](https://github.com/openpeeps) for Supranim<br>
Copyright &copy; 2023 Supranim | OpenPeeps & Contributors &mdash; All rights reserved.

0 comments on commit 8d92215

Please sign in to comment.