quantible 0.3.1 → 0.3.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 +37 -26
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -19,38 +19,49 @@
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 & Math
25
+ - `123` -> "one hundred twenty-three"
26
+ - `1.5` -> "one point five"
27
+ - `5 - 10` -> "five minus ten"
28
+ - `-5 + 10` -> "negative five plus ten"
29
+ - `1,234,567` -> "one million two hundred thirty-four thousand five hundred sixty-seven"
30
+
31
+ ### 💰 Currencies (Symbol & Code)
32
+ - `$1,000` -> "one thousand dollars"
33
+ - `€50.00` -> "fifty euros"
34
+ - `100 ₩` -> "one hundred won"
35
+ - `123.45 USD` -> "one hundred twenty-three dollars and forty-five cents"
36
+ - `$1.5` -> "one dollar and fifty cents" (Smart padding)
37
+
38
+ ### 📏 Units & Scientific Notation
39
+ - `10m/s` -> "ten meters per second"
40
+ - `15m/s²` -> "fifteen meters per second squared"
41
+ - `5E-10` -> "five times ten to the power of negative ten"
42
+ - `1.23e-4 mol·L⁻¹·s⁻¹` -> "one point twenty-three times ten to the power of negative four moles per liter per second"
43
+
44
+ ### 🏷️ Versioning & Identifiers
45
+ - `v2` -> "v two"
46
+ - `v3.2.1` -> "v three point two point one"
47
+ - `_5` -> "underscore five"
48
+ - `file_name_v2` -> "file underscore name underscore v two"
49
+
50
+ ### 🔣 Abbreviations & Symbols (Normalization)
51
+ - `A & B` -> "A and B"
52
+ - `e.g.` -> "example given"
53
+ - `i.e.` -> "that is"
54
+ - `test@example.com` -> "test at example dot com" (Email normalization)
55
+ - `www.hello.com` -> "double you double you double you dot hello dot com" (Website normalization)
56
+ - `Item #1` -> "Item hash one"
44
57
 
45
58
  The `autoReplaceAllMatches` function demonstrates the power of Quantible by converting all quantities within a text:
46
59
 
47
60
  **Input Sentence:**
48
-
49
- > "We made $500 more this year than last years projections of 25%"
61
+ > "The new SSD offers 2TB capacity, costs $199.99, and runs at 5,400 RPM."
50
62
 
51
63
  **Output Sentence (after `autoReplaceAllMatches`):**
52
-
53
- > "We made five hundred dollars more this year than last years projections of twenty-five percent"
64
+ > "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
65
 
55
66
  ## Installation
56
67
 
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.3",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",