make-it-rain 1.0.3 → 1.1.0

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 +10 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,6 @@
1
1
  # 💸 make-it-rain 💸
2
+ [![Version](https://img.shields.io/badge/version-1.1.0-blue)](https://npmjs.com/package/make-it-rain) [![Node.js](https://img.shields.io/badge/node-%3E%3D12.0-brightgreen)](https://nodejs.org/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3
+
2
4
  ### The Only Money Formatter You'll Ever Need (Probably)
3
5
 
4
6
  So, you've finally decided that numbers should look nice? **Wow, groundbreaking.**
@@ -10,7 +12,6 @@ Because:
10
12
  ✅ You're too lazy to format numbers manually (same).
11
13
  ✅ You finally realized not everyone uses the same thousands separator.
12
14
  ✅ You enjoy writing `toLocaleString()` 50 times per project? No? Didn’t think so.
13
- ✅ Now lets you swap between currency symbols (€, $, ¥) or ISO codes (EUR, USD, JPY) because preferences exist.
14
15
 
15
16
  ## 📦 Installation
16
17
  Oh no, another package to install? **Deal with it.**
@@ -27,20 +28,19 @@ yarn add make-it-rain
27
28
  Initialize this life-changing formatter once, then flex on your ugly numbers forever.
28
29
 
29
30
  ```js
30
- const makeItRain = require("make-it-rain");
31
+ const makeItRain = require("make-it-rain");
31
32
 
32
- const money = makeItRain("EUR", ".", true); // Set it and forget it
33
+ const money = makeItRain("EUR", "."); // Set it and forget it
33
34
 
34
- console.log(money.makeItPretty(1234567.89)); // €1.234.567,89
35
- money.useWhat(false); // Switch to ISO code mode
36
- console.log(money.makeItPretty(1234567.89)); // EUR 1.234.567,89
35
+ console.log(money.makeItPretty(1234567.89)); // €1.234.567,89
36
+ console.log(money.makeItPretty(99.99)); // €99,99
37
+ console.log(money.makeItPretty(1000000)); // €1.000.000,00
37
38
  ```
38
39
  ## 🎩 Features (That Should Have Existed in JavaScript Already)
39
40
  - One-time setup: Set currency & separator once, use it everywhere.
40
41
  - Formats numbers beautifully: Because nobody likes reading 1000000.00.
41
42
  - Handles separators like a champ: Pick , or ., because the world can't agree.
42
43
  - Errors when you mess up: Because I'm not letting you pass "lol" as a number.
43
- - Toggle between currency symbols & ISO codes: Because some people prefer "€" while others need "EUR" for some serious reason.
44
44
 
45
45
  ## ❌ What This Won’t Do
46
46
  - Convert currency: This isn't a forex exchange, buddy.
@@ -51,11 +51,8 @@ console.log(money.makeItPretty(1234567.89)); // EUR 1.234.567,89
51
51
 
52
52
  | Method | Description |
53
53
  |--------|-------------|
54
- |`makeItRain(currency, separator, useSymbol)` | Initializes the formatter once. Currency = any ISO currency code, separator = `,` or .`,` useSymbol = `true` for symbols (`$`), `false` for codes (`USD`). |
54
+ |`makeItRain(currency, separator)` | Initializes the formatter once. Currency = any ISO currency code, separator = `,` or `.` |
55
55
  | `makeItPretty(amount)` | Takes a number and makes it visually acceptable.|
56
- | `swapMoney(newCurrency)` | Change the currency to something else, because why not? |
57
- | `useWhat(symbol)` | Toggle between using currency symbols (`$`) or ISO codes (`USD`). |
58
- | `whatNow()` | Returns the current currency, in case you forgot. |
59
56
 
60
57
  ## 🏆 Contributing
61
58
  Want to contribute? Cool. Fork it, break it, fix it, and submit a PR.
@@ -66,4 +63,5 @@ MIT – Because I'm not here to sue you.
66
63
  ## ⭐ Pro Tip
67
64
  Use this package and pretend you’re rich. You’re welcome.
68
65
 
69
- This README will **ensure** your package is taken *seriously* while also making people question their life choices.
66
+ This README will **ensure** your package is taken *seriously* while also making people question their life choices.
67
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "make-it-rain",
3
- "version": "1.0.3",
3
+ "version": "1.1.0",
4
4
  "description": "Because who formats money manually like a peasant?",
5
5
  "main": "index.js",
6
6
  "bin": {