quantible 0.3.1 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +35 -27
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -19,38 +19,46 @@
19
19
 
20
20
  ## Examples
21
21
 
22
- Quantible excels at transforming various numerical expressions into their spoken word equivalents:
23
-
24
- - `5 - 10` -> "five minus ten"
25
- - `-5 + 10` -> "negative five plus ten"
26
- - `10m/s` -> "ten meters per second"
27
- - `15m/s²` -> "fifteen meters per second squared"
28
- - `15²` or `15^2` -> "fifteen to the power of two"
29
- - `2^2m^2` -> "two to the power of two meters squared"
30
- - `2^2m²` -> "two to the power of two square meters"
31
- - `5E-10` -> "five times ten to the power of negative ten"
32
- - `-5E10` -> "negative five times ten to the power of ten"
33
- - `5E10` -> "five times ten to the power of ten"
34
- - `5 USD` -> "five dollars"
35
- - `$5` -> "five dollars"
36
- - `5.25 USD` -> "five dollars and twenty-five cents"
37
- - `$5.25` -> "five dollars and twenty-five cents"
38
- - `1000 ₩` -> "one thousand won"
39
- - `v2` -> "v two"
40
- - `_5` -> "underscore five"
41
- - `A & B` -> "A and B"
42
- - `e.g.` -> "example given"
43
-
22
+ Quantible handles a wide spectrum of numerical and symbolic expressions, converting them into natural, spoken-word English.
23
+
24
+ ### 🔢 Numbers & Decimals
25
+ - `123` -> "one hundred twenty-three"
26
+ - `1,234,567` -> "one million two hundred thirty-four thousand five hundred sixty-seven"
27
+ - `1.5` -> "one point five"
28
+ - `-45.67` -> "negative forty-five point sixty-seven"
29
+
30
+ ### 💰 Currencies (Symbol & Code)
31
+ - `$1,000` -> "one thousand dollars"
32
+ - `€50.00` -> "fifty euros"
33
+ - `100 ₩` -> "one hundred won"
34
+ - `123.45 USD` -> "one hundred twenty-three dollars and forty-five cents"
35
+ - `$1.5` -> "one dollar and fifty cents" (Smart padding)
36
+
37
+ ### 📏 Units & Scientific Notation
38
+ - `10m/s` -> "ten meters per second"
39
+ - `15m/s²` -> "fifteen meters per second squared"
40
+ - `5E-10` -> "five times ten to the power of negative ten"
41
+ - `1.23e-4 mol·L⁻¹·s⁻¹` -> "one point twenty-three times ten to the power of negative four moles per liter per second"
42
+
43
+ ### 🏷️ Versioning & Identifiers
44
+ - `v2` -> "v two"
45
+ - `v3.2.1` -> "v three point two point one"
46
+ - `_5` -> "underscore five"
47
+ - `file_name_v2` -> "file underscore name underscore v two"
48
+
49
+ ### 🔣 Abbreviations & Symbols
50
+ - `A & B` -> "A and B"
51
+ - `e.g.` -> "example given"
52
+ - `i.e.` -> "that is"
53
+ - `Item #1` -> "Item hash one"
44
54
 
45
55
  The `autoReplaceAllMatches` function demonstrates the power of Quantible by converting all quantities within a text:
46
56
 
47
57
  **Input Sentence:**
58
+ > "The new SSD offers 2TB capacity, costs $199.99, and runs at 5,400 RPM."
48
59
 
49
- > "We made $500 more this year than last years projections of 25%"
50
-
51
- **Output Sentence (after `autoReplaceAllMatches`):**
52
-
53
- > "We made five hundred dollars more this year than last years projections of twenty-five percent"
60
+ **Output Sentence:**
61
+ > "The new SSD offers two terabytes capacity, costs one hundred ninety-nine dollars and ninety-nine cents, and runs at five thousand four hundred revolutions per minute."
54
62
 
55
63
  ## Installation
56
64
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quantible",
3
3
  "description": "A versatile library for extracting and converting numerical values, units, currency, and mathematical expressions into their spoken word equivalents.",
4
- "version": "0.3.1",
4
+ "version": "0.3.2",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",