quantible 0.2.0 → 0.2.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.
- package/README.md +5 -5
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,10 +72,10 @@ For the quickest integration into web pages, you can use a Content Delivery Netw
|
|
|
72
72
|
</head>
|
|
73
73
|
<body>
|
|
74
74
|
<div id="output"></div>
|
|
75
|
-
<script src="https://unpkg.com/quantible/dist/index.
|
|
75
|
+
<script src="https://unpkg.com/quantible@latest/dist/index.iife.min.js"></script>
|
|
76
76
|
<script>
|
|
77
77
|
const inputString = "The price is $12.50 USD.";
|
|
78
|
-
const spokenText =
|
|
78
|
+
const spokenText = Quantible.convertQuantities.autoReplaceAllMatches(inputString);
|
|
79
79
|
document.getElementById('output').textContent = spokenText;
|
|
80
80
|
</script>
|
|
81
81
|
</body>
|
|
@@ -84,9 +84,9 @@ For the quickest integration into web pages, you can use a Content Delivery Netw
|
|
|
84
84
|
|
|
85
85
|
In this example:
|
|
86
86
|
|
|
87
|
-
* We include Quantible by referencing the
|
|
88
|
-
* The library is then globally accessible as `
|
|
89
|
-
* We use `
|
|
87
|
+
* We include Quantible by referencing the IIFE build from unpkg CDN: `https://unpkg.com/quantible@latest/dist/index.iife.min.js`.
|
|
88
|
+
* The library is then globally accessible as `Quantible`.
|
|
89
|
+
* We use `Quantible.convertQuantities.autoReplaceAllMatches` to process a string and display the spoken word output in the `div#output` element.
|
|
90
90
|
|
|
91
91
|
### 2. CommonJS (CJS) - `require`
|
|
92
92
|
|
package/dist/index.cjs
CHANGED
|
@@ -508,7 +508,7 @@ function zeroTo999(num) {
|
|
|
508
508
|
words += numbers.tens[Math.floor(num / 10)];
|
|
509
509
|
num %= 10;
|
|
510
510
|
if (num > 0) {
|
|
511
|
-
words += "
|
|
511
|
+
words += "-" + numbers.ones[num];
|
|
512
512
|
}
|
|
513
513
|
} else if (num >= 10) {
|
|
514
514
|
words += numbers.teens[num - 10];
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/config/default.ts","../src/utils/extraction/regexPatterns.ts","../src/utils/extraction/patternExtractor.ts","../src/utils/stringBuilding/zeroTo999.ts","../src/utils/stringBuilding/positiveInteger.ts","../src/utils/stringBuilding/twoDigits.ts","../src/utils/stringBuilding/negative.ts","../src/converters/convertCurrencyToSpokenWord.ts","../src/utils/stringBuilding/perDigit.ts","../src/utils/parseSuperscript.ts","../src/utils/stringBuilding/exponent.ts","../src/converters/convertNumberToSpokenWord.ts","../src/converters/convertNumericUnitToSpokenWord.ts","../src/converters/convertOperatorToSpokenWord.ts","../src/converters/convertScientificExpressionToSpokenWord.ts","../src/converters/convertUnitOnlyToSpokenWord.ts","../src/utils/validateExtractionResultObject.ts","../src/index.ts"],"names":[],"mappings":";;;AAEO,IAAM,KAAiC,GAAA;AAAA;AAAA,EAE5C,CAAG,EAAA,EAAE,QAAU,EAAA,OAAA,EAAS,QAAQ,QAAS,EAAA;AAAA,EACzC,GAAK,EAAA,EAAE,QAAU,EAAA,SAAA,EAAW,QAAQ,SAAU,EAAA;AAAA,EAC9C,EAAI,EAAA,EAAE,QAAU,EAAA,YAAA,EAAc,QAAQ,aAAc,EAAA;AAAA,EACpD,EAAI,EAAA,EAAE,QAAU,EAAA,YAAA,EAAc,QAAQ,aAAc,EAAA;AAAA,EACpD,EAAI,EAAA,EAAE,QAAU,EAAA,WAAA,EAAa,QAAQ,YAAa,EAAA;AAAA,EAClD,EAAI,EAAA,EAAE,QAAU,EAAA,MAAA,EAAQ,QAAQ,QAAS,EAAA;AAAA,EACzC,EAAI,EAAA,EAAE,QAAU,EAAA,MAAA,EAAQ,QAAQ,MAAO,EAAA;AAAA,EACvC,EAAI,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B,IAAA,OAAO,MAAM,OAAQ,CAAA,KAAA,CAAM,OAAO,iBAAkB,CAAA,cAAA,CAAe,KAAK,CAAC,CAAA;AAAA,GAC3E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,qBAAA,EAAuB,CAAC,KAA0B,KAAA;AAChD,IAAM,MAAA,OAAA,GAAU,kBAAkB,KAAK,CAAA;AAEvC,IAAI,IAAA,OAAA,CAAQ,WAAW,CAAG,EAAA;AACxB,MAAO,OAAA,KAAA;AAAA;AAGT,IAAA,IAAI,MAAS,GAAA,EAAA;AACb,IAAA,IAAI,SAAY,GAAA,CAAA;AAEhB,IAAA,KAAA,MAAW,SAAS,OAAS,EAAA;AAC3B,MAAA,MAAA,IAAU,KAAM,CAAA,SAAA,CAAU,SAAW,EAAA,KAAA,CAAM,KAAK,CAAA;AAChD,MAAU,MAAA,IAAA,iBAAA,CAAkB,eAAe,KAAK,CAAA;AAChD,MAAY,SAAA,GAAA,KAAA,CAAM,KAAQ,GAAA,KAAA,CAAM,KAAM,CAAA,MAAA;AAAA;AAGxC,IAAU,MAAA,IAAA,KAAA,CAAM,UAAU,SAAS,CAAA;AACnC,IAAA,OAAO,MAAO,CAAA,OAAA,CAAQ,MAAQ,EAAA,GAAG,EAAE,IAAK,EAAA;AAAA;AAE5C;AAEA,OAAA,CAAQ,GAAI,CAAA,iBAAA,CAAkB,qBAAsB,CAAA,QAAQ,CAAC,CAAA","file":"index.cjs","sourcesContent":["import { Currency, Unit } from \"../interfaces/configurations/default\";\n\nexport const units: { [key: string]: Unit } = {\n // Base units\n m: { singular: \"meter\", plural: \"meters\" },\n \"%\": { singular: \"percent\", plural: \"percent\" },\n cm: { singular: \"centimeter\", plural: \"centimeters\" },\n mm: { singular: \"millimeter\", plural: \"millimeters\" },\n km: { singular: \"kilometer\", plural: \"kilometers\" },\n in: { singular: \"inch\", plural: \"inches\" },\n ft: { singular: \"foot\", plural: \"feet\" },\n yd: { singular: \"yard\", plural: \"yards\" },\n mi: { singular: \"mile\", plural: \"miles\" },\n g: { singular: \"gram\", plural: \"grams\" },\n mg: { singular: \"milligram\", plural: \"milligrams\" },\n kg: { singular: \"kilogram\", plural: \"kilograms\" },\n L: { singular: \"liter\", plural: \"liters\" },\n mL: { singular: \"milliliter\", plural: \"milliliters\" },\n s: { singular: \"second\", plural: \"seconds\" },\n min: { singular: \"minute\", plural: \"minutes\" },\n h: { singular: \"hour\", plural: \"hours\" },\n\n // Additional Time Units\n d: { singular: \"day\", plural: \"days\" },\n wk: { singular: \"week\", plural: \"weeks\" },\n mo: { singular: \"month\", plural: \"months\" },\n yr: { singular: \"year\", plural: \"years\" },\n\n // Additional Length Units\n μm: { singular: \"micrometer\", plural: \"micrometers\" },\n nm: { singular: \"nanometer\", plural: \"nanometers\" },\n nmi: { singular: \"nautical mile\", plural: \"nautical miles\" },\n\n // Additional Mass Units\n μg: { singular: \"microgram\", plural: \"micrograms\" },\n t: { singular: \"tonne\", plural: \"tonnes\" },\n lb: { singular: \"pound\", plural: \"pounds\" },\n oz: { singular: \"ounce\", plural: \"ounces\" },\n st: { singular: \"stone\", plural: \"stones\" },\n\n // Volume Units\n \"cm³\": { singular: \"cubic centimeter\", plural: \"cubic centimeters\" },\n gal: { singular: \"gallon\", plural: \"gallons\" },\n pt: { singular: \"pint\", plural: \"pints\" },\n qt: { singular: \"quart\", plural: \"quarts\" },\n \"fl oz\": { singular: \"fluid ounce\", plural: \"fluid ounces\" },\n \"ft³\": { singular: \"cubic foot\", plural: \"cubic feet\" },\n \"in³\": { singular: \"cubic inch\", plural: \"cubic inches\" },\n bbl: { singular: \"barrel\", plural: \"barrels\" },\n\n // Area Units\n \"m²\": { singular: \"square meter\", plural: \"square meters\" },\n \"km²\": { singular: \"square kilometer\", plural: \"square kilometers\" },\n \"cm²\": { singular: \"square centimeter\", plural: \"square centimeters\" },\n \"mm²\": { singular: \"square millimeter\", plural: \"square millimeters\" },\n ha: { singular: \"hectare\", plural: \"hectares\" },\n \"ft²\": { singular: \"square foot\", plural: \"square feet\" },\n \"in²\": { singular: \"square inch\", plural: \"square inches\" },\n ac: { singular: \"acre\", plural: \"acres\" },\n\n // Angle Units\n rad: { singular: \"radian\", plural: \"radians\" },\n deg: { singular: \"degree\", plural: \"degrees\" },\n grad: { singular: \"gradian\", plural: \"gradians\" },\n\n // Temperature Units\n K: { singular: \"kelvin\", plural: \"kelvins\" },\n \"°C\": { singular: \"degree Celsius\", plural: \"degrees Celsius\" },\n \"°F\": { singular: \"degree Fahrenheit\", plural: \"degrees Fahrenheit\" },\n\n // Speed Units\n \"m/s\": { singular: \"meter per second\", plural: \"meters per second\" },\n \"m/s²\": {\n singular: \"meter per second squared\",\n plural: \"meters per second squared\",\n },\n \"km/h\": { singular: \"kilometer per hour\", plural: \"kilometers per hour\" },\n \"km/L\": { singular: \"kilometer per liter\", plural: \"kilometers per liter\" },\n mph: { singular: \"mile per hour\", plural: \"miles per hour\" },\n \"ft/s\": { singular: \"foot per second\", plural: \"feet per second\" },\n kn: { singular: \"knot\", plural: \"knots\" },\n mach: { singular: \"mach\", plural: \"\" },\n c: { singular: \"speed of light\", plural: \"\" },\n\n // Force Units\n N: { singular: \"newton\", plural: \"newtons\" },\n kgf: { singular: \"kilogram-force\", plural: \"\" },\n lbf: { singular: \"pound-force\", plural: \"\" },\n dyn: { singular: \"dyne\", plural: \"dynes\" },\n\n // Pressure Units\n Pa: { singular: \"pascal\", plural: \"pascals\" },\n kPa: { singular: \"kilopascal\", plural: \"kilopascals\" },\n MPa: { singular: \"megapascal\", plural: \"megapascals\" },\n bar: { singular: \"bar\", plural: \"bars\" },\n atm: { singular: \"atmosphere\", plural: \"atmospheres\" },\n mmHg: { singular: \"millimeter of mercury\", plural: \"millimeters of mercury\" },\n inHg: { singular: \"inch of mercury\", plural: \"inches of mercury\" },\n psi: { singular: \"pound per square inch\", plural: \"pounds per square inch\" },\n \"N/m²\": {\n singular: \"newton per square meter\",\n plural: \"newtons per square meter\",\n },\n \"kg/m²\": {\n singular: \"kilogram per square meter\",\n plural: \"kilograms per square meter\",\n },\n\n // Energy Units\n J: { singular: \"joule\", plural: \"joules\" },\n kJ: { singular: \"kilojoule\", plural: \"kilojoules\" },\n MJ: { singular: \"megajoule\", plural: \"megajoules\" },\n cal: { singular: \"calorie\", plural: \"calories\" },\n kcal: { singular: \"kilocalorie\", plural: \"kilocalories\" },\n eV: { singular: \"electron volt\", plural: \"electron volts\" },\n BTU: { singular: \"British thermal unit\", plural: \"British thermal units\" },\n kWh: { singular: \"kilowatt hour\", plural: \"kilowatt hours\" },\n\n // Power Units\n W: { singular: \"watt\", plural: \"watts\" },\n kW: { singular: \"kilowatt\", plural: \"kilowatts\" },\n MW: { singular: \"megawatt\", plural: \"megawatts\" },\n hp: { singular: \"horsepower\", plural: \"\" },\n\n // Frequency Units\n Hz: { singular: \"hertz\", plural: \"\" },\n kHz: { singular: \"kilohertz\", plural: \"\" },\n MHz: { singular: \"megahertz\", plural: \"\" },\n GHz: { singular: \"gigahertz\", plural: \"\" },\n rpm: { singular: \"revolution per minute\", plural: \"revolutions per minute\" },\n \"rad/s\": { singular: \"radian per second\", plural: \"radians per second\" },\n \"deg/s\": { singular: \"degree per second\", plural: \"degrees per second\" },\n\n // Electrical Units\n V: { singular: \"volt\", plural: \"volts\" },\n mV: { singular: \"millivolt\", plural: \"millivolts\" },\n μV: { singular: \"microvolt\", plural: \"microvolts\" },\n kV: { singular: \"kilovolt\", plural: \"kilovolts\" },\n A: { singular: \"ampere\", plural: \"amperes\" },\n mA: { singular: \"milliampere\", plural: \"milliamperes\" },\n μA: { singular: \"microampere\", plural: \"microamperes\" },\n Ω: { singular: \"ohm\", plural: \"ohms\" },\n kΩ: { singular: \"kilohm\", plural: \"kilohms\" },\n MΩ: { singular: \"megohm\", plural: \"megohms\" },\n F: { singular: \"farad\", plural: \"farads\" },\n μF: { singular: \"microfarad\", plural: \"microfarads\" },\n nF: { singular: \"nanofarad\", plural: \"nanofarads\" },\n pF: { singular: \"picofarad\", plural: \"picofarads\" },\n H: { singular: \"henry\", plural: \"henries\" },\n mH: { singular: \"millihenry\", plural: \"millihenries\" },\n μH: { singular: \"microhenry\", plural: \"microhenries\" },\n S: { singular: \"siemens\", plural: \"\" },\n \"S/m\": { singular: \"siemens per meter\", plural: \"\" },\n \"F/m\": { singular: \"farad per meter\", plural: \"farads per meter\" },\n \"Ω·m\": { singular: \"ohm meter\", plural: \"ohm meters\" },\n \"V/m\": { singular: \"volt per meter\", plural: \"volts per meter\" },\n \"A/m\": { singular: \"ampere per meter\", plural: \"amperes per meter\" },\n\n // Magnetic Units\n T: { singular: \"tesla\", plural: \"teslas\" },\n mT: { singular: \"millitesla\", plural: \"milliteslas\" },\n μT: { singular: \"microtesla\", plural: \"microteslas\" },\n G: { singular: \"gauss\", plural: \"\" },\n Wb: { singular: \"weber\", plural: \"webers\" },\n mWb: { singular: \"milliweber\", plural: \"milliwebers\" },\n μWb: { singular: \"microweber\", plural: \"microwebers\" },\n\n // Density Units\n \"kg/m³\": {\n singular: \"kilogram per cubic meter\",\n plural: \"kilograms per cubic meter\",\n },\n \"g/cm³\": {\n singular: \"gram per cubic centimeter\",\n plural: \"grams per cubic centimeter\",\n },\n \"g/mL\": { singular: \"gram per milliliter\", plural: \"grams per milliliter\" },\n \"lb/ft³\": {\n singular: \"pound per cubic foot\",\n plural: \"pounds per cubic foot\",\n },\n \"lb/in³\": {\n singular: \"pound per cubic inch\",\n plural: \"pounds per cubic inch\",\n },\n sg: { singular: \"specific gravity\", plural: \"\" },\n\n // Volumetric Flow Units\n \"m³/s\": {\n singular: \"cubic meter per second\",\n plural: \"cubic meters per second\",\n },\n \"L/s\": { singular: \"liter per second\", plural: \"liters per second\" },\n \"L/min\": { singular: \"liter per minute\", plural: \"liters per minute\" },\n \"L/h\": { singular: \"liter per hour\", plural: \"liters per hour\" },\n \"gal/min\": { singular: \"gallon per minute\", plural: \"gallons per minute\" },\n \"ft³/s\": {\n singular: \"cubic foot per second\",\n plural: \"cubic feet per second\",\n },\n \"bbl/d\": { singular: \"barrel per day\", plural: \"barrels per day\" },\n\n // Fuel Economy Units\n \"L/100km\": { singular: \"liter per 100 kilometers\", plural: \"\" },\n mpg: { singular: \"mile per gallon\", plural: \"miles per gallon\" },\n mpg_imp: {\n singular: \"mile per gallon imperial\",\n plural: \"miles per gallon imperial\",\n },\n \"L/km\": { singular: \"liter per kilometer\", plural: \"liters per kilometer\" },\n \"L/m\": { singular: \"liter per meter\", plural: \"liters per meter\" },\n\n // Concentration Units\n ppm: { singular: \"part per million\", plural: \"parts per million\" },\n ppb: { singular: \"part per billion\", plural: \"parts per billion\" },\n ppt: { singular: \"part per trillion\", plural: \"parts per trillion\" },\n \"mol/L\": { singular: \"mole per liter\", plural: \"moles per liter\" },\n \"mol/m³\": {\n singular: \"mole per cubic meter\",\n plural: \"moles per cubic meter\",\n },\n \"mg/L\": { singular: \"milligram per liter\", plural: \"milligrams per liter\" },\n \"g/L\": { singular: \"gram per liter\", plural: \"grams per liter\" },\n \"mg/kg\": {\n singular: \"milligram per kilogram\",\n plural: \"milligrams per kilogram\",\n },\n\n // Illumination Units\n lm: { singular: \"lumen\", plural: \"lumens\" },\n cd: { singular: \"candela\", plural: \"candelas\" },\n lx: { singular: \"lux\", plural: \"\" },\n \"ft-cd\": { singular: \"foot-candle\", plural: \"foot-candles\" },\n\n // Radiation Units\n Bq: { singular: \"becquerel\", plural: \"becquerels\" },\n Ci: { singular: \"curie\", plural: \"curies\" },\n Sv: { singular: \"sievert\", plural: \"sieverts\" },\n Gy: { singular: \"gray\", plural: \"grays\" },\n\n // Catalytic Activity Units\n kat: { singular: \"katal\", plural: \"katals\" },\n U: { singular: \"enzyme unit\", plural: \"enzyme units\" },\n\n // Viscosity and Fluid Properties Units\n \"Pa·s\": { singular: \"pascal second\", plural: \"pascal seconds\" },\n cP: { singular: \"centipoise\", plural: \"\" },\n \"kg/(m·s)\": {\n singular: \"kilogram per meter second\",\n plural: \"kilograms per meter second\",\n },\n \"lb/(ft·s)\": {\n singular: \"pound per foot second\",\n plural: \"pounds per foot second\",\n },\n \"m²/s\": {\n singular: \"square meter per second\",\n plural: \"square meters per second\",\n },\n St: { singular: \"stokes\", plural: \"\" },\n cSt: { singular: \"centistokes\", plural: \"\" },\n \"N/m\": { singular: \"newton per meter\", plural: \"newtons per meter\" },\n \"dyn/cm\": { singular: \"dyne per centimeter\", plural: \"dynes per centimeter\" },\n\n // Thermal Properties Units\n \"W/(m·K)\": {\n singular: \"watt per meter kelvin\",\n plural: \"watts per meter kelvin\",\n },\n \"cal/(cm·s·°C)\": {\n singular: \"calorie per centimeter second degree Celsius\",\n plural: \"calories per centimeter second degree Celsius\",\n },\n \"J/(kg·K)\": {\n singular: \"joule per kilogram kelvin\",\n plural: \"joules per kilogram kelvin\",\n },\n \"cal/(g·°C)\": {\n singular: \"calorie per gram degree Celsius\",\n plural: \"calories per gram degree Celsius\",\n },\n \"1/K\": { singular: \"per kelvin\", plural: \"\" },\n \"1/°C\": { singular: \"per degree Celsius\", plural: \"\" },\n \"W/m²\": {\n singular: \"watt per square meter\",\n plural: \"watts per square meter\",\n },\n \"cal/(cm²·s)\": {\n singular: \"calorie per square centimeter second\",\n plural: \"calories per square centimeter second\",\n },\n \"W/(m²·K)\": {\n singular: \"watt per square meter kelvin\",\n plural: \"watts per square meter kelvin\",\n },\n \"cal/(cm²·s·°C)\": {\n singular: \"calorie per square centimeter second degree Celsius\",\n plural: \"calories per square centimeter second degree Celsius\",\n },\n \"K/W\": { singular: \"kelvin per watt\", plural: \"kelvins per watt\" },\n \"°C/W\": {\n singular: \"degree Celsius per watt\",\n plural: \"degrees Celsius per watt\",\n },\n\n // Data Transfer and Storage Units\n b: { singular: \"bit\", plural: \"bits\" },\n B: { singular: \"byte\", plural: \"bytes\" },\n kb: { singular: \"kilobit\", plural: \"kilobits\" },\n kB: { singular: \"kilobyte\", plural: \"kilobytes\" },\n Mb: { singular: \"megabit\", plural: \"megabits\" },\n MB: { singular: \"megabyte\", plural: \"megabytes\" },\n Gb: { singular: \"gigabit\", plural: \"gigabits\" },\n GB: { singular: \"gigabyte\", plural: \"gigabytes\" },\n Tb: { singular: \"terabit\", plural: \"terabits\" },\n TB: { singular: \"terabyte\", plural: \"terabytes\" },\n bps: { singular: \"bit per second\", plural: \"bits per second\" },\n kbps: { singular: \"kilobit per second\", plural: \"kilobits per second\" },\n Mbps: { singular: \"megabit per second\", plural: \"megabits per second\" },\n Gbps: { singular: \"gigabit per second\", plural: \"gigabits per second\" },\n};\n\nexport const numbers = {\n ones: [\"\", \"one\", \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\", \"nine\"],\n teens: [\"ten\", \"eleven\", \"twelve\", \"thirteen\", \"fourteen\", \"fifteen\", \"sixteen\", \"seventeen\", \"eighteen\", \"nineteen\"],\n tens: [\"\", \"\", \"twenty\", \"thirty\", \"forty\", \"fifty\", \"sixty\", \"seventy\", \"eighty\", \"ninety\"],\n scales: [\"\", \"thousand\", \"million\", \"billion\", \"trillion\", \"quadrillion\", \"quintillion\"],\n ordinals: {\n one: \"first\",\n two: \"second\",\n three: \"third\",\n five: \"fifth\",\n eight: \"eighth\",\n nine: \"ninth\",\n twelve: \"twelfth\",\n },\n};\n\nexport const currencySymbols: { [key: string]: Currency } = {\n $: {\n singular: \"dollar\",\n plural: \"dollars\",\n fraction: { singular: \"cent\", plural: \"cents\" },\n },\n \"€\": {\n singular: \"euro\",\n plural: \"euros\",\n fraction: { singular: \"cent\", plural: \"cents\" },\n },\n \"£\": {\n singular: \"pound\",\n plural: \"pounds\",\n fraction: { singular: \"penny\", plural: \"pence\" },\n },\n \"¥\": {\n singular: \"yen\",\n plural: \"yen\",\n fraction: null,\n },\n \"₹\": {\n singular: \"rupee\",\n plural: \"rupees\",\n fraction: { singular: \"paisa\", plural: \"paise\" },\n },\n};\n\n// Currency codes\nexport const currencyCodes: { [key: string]: Currency } = {\n USD: {\n singular: \"dollar\",\n plural: \"dollars\",\n fraction: { singular: \"cent\", plural: \"cents\" },\n },\n EUR: {\n singular: \"euro\",\n plural: \"euros\",\n fraction: { singular: \"cent\", plural: \"cents\" },\n },\n GBP: {\n singular: \"pound\",\n plural: \"pounds\",\n fraction: { singular: \"penny\", plural: \"pence\" },\n },\n JPY: {\n singular: \"yen\",\n plural: \"yen\",\n fraction: null,\n },\n INR: {\n singular: \"rupee\",\n plural: \"rupees\",\n fraction: { singular: \"paisa\", plural: \"paise\" },\n },\n CHF: {\n singular: \"Swiss franc\",\n plural: \"Swiss francs\",\n fraction: { singular: \"rappen\", plural: \"rappen\" },\n },\n AUD: {\n singular: \"Australian dollar\",\n plural: \"Australian dollars\",\n fraction: { singular: \"cent\", plural: \"cents\" },\n },\n CAD: {\n singular: \"Canadian dollar\",\n plural: \"Canadian dollars\",\n fraction: { singular: \"cent\", plural: \"cents\" },\n },\n};\n\nexport const currencies = {\n ...currencySymbols,\n ...currencyCodes,\n};\n\nexport const math = {\n \"+\": \"plus\",\n \"-\": \"minus\",\n \"*\": \"times\",\n \"×\": \"times\",\n \"·\": \"times\",\n \"/\": \"divided by\",\n \"÷\": \"divided by\",\n \":\": \"divided by\",\n \"^\": \"to the power of\",\n};\n","import { units, math, currencyCodes, currencySymbols } from \"../../config/default\";\n\nconst sanitizeString = (str: string): string => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n};\n\n// Dynamic pattern generation from config\nconst currencySymbolsSanitized = Object.keys(currencySymbols)\n .map((key) => sanitizeString(key)) // Escape special regex characters\n .join(\"|\");\nconst currencyCodesSanitized = Object.keys(currencyCodes).join(\"|\");\n\nconst allUnits = Object.keys(units)\n .map((key) => sanitizeString(key))\n .sort((a, b) => b.length - a.length)\n .join(\"|\");\n\nconst operatorSymbols = Object.keys(math)\n .map((operator) => sanitizeString(operator))\n .join(\"|\");\n\nconst regexMatches = new RegExp(\n [\n // Currency Matching (Highest Priority)\n `(?<=^|\\\\s)(?:` + // Ensures the match is at the beginning of the string or preceded by whitespace\n `(?<symbolCurrency>(?<negativeSignSymbol>-)?(?<currencySymbol>${currencySymbolsSanitized})\\\\s*(?<symbolInt>(?:\\\\d{1,3}(?:,\\\\d{3})*|\\\\d+))(?:\\\\.(?<symbolDec>\\\\d+))?)` + // Matches currency with symbols\n `|` + // OR\n `(?<codeCurrency>(?<negativeSignCode>-)?(?<codeInt>(?:\\\\d{1,3}(?:,\\\\d{3})*|\\\\d+))(?:\\\\.(?<codeDec>\\\\d+))?[ \\\\t]*(?<currencyCode>${currencyCodesSanitized}))` + // Matches currency with codes\n `)` + // End of currency matching group\n `(?=(?:\\\\s|$|(?:\\\\.(?!\\\\d))|[^\\\\d.]))`, // Ensures the match is followed by whitespace, end of string, or non-numeric characters\n\n // Scientific Notation 5e-10, 5e10, 5.5e10, 5.5e-10\n `|(?<scientific>` + // Group for scientific notation\n `(?<negativeSignScientific>-)?(?<scientificInt>\\\\d+)(?:\\\\.(?<scientificDec>\\\\d+))?(?:[eE])(?<scientificExponent>[+-]?\\\\d+)` + // Matches scientific notation format\n `)(?=(?:\\\\s|$|(?:\\\\.(?!\\\\d))|[^\\\\d.]))`, // Ensures the match is followed by whitespace, end of string, or non-numeric characters\n\n // Numeric Units 5km, 10m/s, 10m/s^2, 10m/s², 10m²/s, 10m²/s²\n `|(?<unit>` + // Group for units\n `(?<negativeSignUnit>-)?(?<unitInt>(?:\\\\d{1,3}(?:,\\\\d{3})*|\\\\d+))(?:\\\\.(?<unitDec>\\\\d+))?` + // Matches the number part of the unit\n `\\\\s*` + // Matches optional whitespace\n `(?:` + // Group for handling exponents (caret or superscript)\n `\\\\^(?<unitCaretExponentPre>-?\\\\d+)|` + // Matches caret exponent\n `(?<unitSuperExponentPre>⁻?[¹²³⁴⁵⁶⁷⁸⁹])` + // Matches superscript exponent\n `)?` + // End of exponent group\n `\\\\s*(?<unitName>(?:${allUnits})\\\\b)` + // Matches the unit name\n `(?:` + // Group for handling exponents (caret or superscript)\n `\\\\^(?<unitCaretExponentPost>-?\\\\d+)|` + // Matches caret exponent\n `(?<unitSuperExponentPost>⁻?[¹²³⁴⁵⁶⁷⁸⁹])` + // Matches superscript exponent\n `)?` + // End of exponent group\n `)(?=(?:\\\\s|$|(?:\\\\.(?!\\\\d))|[^\\\\d.]))`, // Ensures the match is followed by whitespace, end of string, or non-numeric characters\n\n // Number with optional exponent\n `|(?<!\\\\w)(?<number>` + // Group for number\n `(?<negativeSignInteger>-)?` + // Matches an optional negative sign\n `(?<integerInt>(?:\\\\d{1,3}(?:,\\\\d{3})*|\\\\d+))` + // Matches the integer part of the number\n `(?:\\\\.(?<integerDec>\\\\d+))?` + // Matches the decimal part of the number\n `(?:(?:\\\\^(?<integerCaretExponent>-?\\\\d+))|` + // Matches exponent with caret\n `(?<integerSuperExponent>⁻?[¹²³⁴⁵⁶⁷⁸⁹]))?` + // Matches exponent with superscript\n `)(?=(?:\\\\s|$|(?:\\\\.(?!\\\\d))|[^\\\\d.]))`, // Ensures the match is followed by whitespace, end of string, or non-numeric characters\n\n // Unit Only (e.g., m, kg, m², kg³)\n `|(?<unitOnly>` + // Group for unit only\n `(?<![\\\\w.])` + // Negative lookbehind to prevent matching units within words\n `(?<unitNameOnly>(?:${allUnits})\\\\b)` + // Matches the unit name\n `(?:\\\\^(?<unitOnlyCaretExponent>-?\\\\d+)|(?<unitOnlySuperExponent>⁻?[¹²³⁴⁵⁶⁷⁸⁹]))?` + // Matches optional exponent\n `(?!\\\\w)` + // Negative lookahead to prevent matching units within words\n `)(?=(?:\\\\s|$|(?:\\\\.(?!\\\\d))|[^\\\\d.]))`, // Ensures the match is followed by whitespace, end of string, or non-numeric characters\n // Mathematical Operators\n `|(?<operator>(?:(?<=^)|(?<=\\\\s))(${operatorSymbols})(?=\\\\s|$|(?:\\\\.(?!\\\\d))))`, // Matches mathematical operators\n ].join(\"\"),\n \"u\",\n);\n\nexport { regexMatches };\n","import { regexMatches } from \"./regexPatterns\";\nimport { ExtractionResult } from \"../../interfaces/definitions\";\n\n/**\n * Returns the first match of a number, currency, unit, or exponent in the given string.\n * The returned object contains the extracted groups and additional information such as\n * the type of match and the index of the match in the string.\n *\n * @param {string} input - The string to search for matches\n * @returns {ExtractionResult | null} - The extracted groups and additional information, or null if no match is found\n */\n\nexport function extractFirstMatch(input: string): ExtractionResult | null {\n const match = input.match(regexMatches);\n\n if (match && match.groups && match.index !== undefined) {\n const matchedGroup = Object.fromEntries(Object.entries(match.groups).filter(([_, value]) => value !== undefined));\n let matchType = Object.keys(matchedGroup)[0];\n\n const extractedGroup = {} as ExtractionResult;\n\n switch (matchType) {\n case \"symbolCurrency\":\n extractedGroup.integer = matchedGroup[\"symbolInt\"];\n extractedGroup.decimal = matchedGroup[\"symbolDec\"];\n extractedGroup.negativeInt = matchedGroup[\"negativeSignSymbol\"] !== undefined;\n extractedGroup.currency = matchedGroup[\"currencySymbol\"];\n break;\n case \"codeCurrency\":\n extractedGroup.integer = matchedGroup[\"codeInt\"];\n extractedGroup.decimal = matchedGroup[\"codeDec\"];\n extractedGroup.negativeInt = matchedGroup[\"negativeSignCode\"] !== undefined;\n extractedGroup.currency = matchedGroup[\"currencyCode\"];\n break;\n case \"scientific\":\n extractedGroup.integer = matchedGroup[\"scientificInt\"];\n extractedGroup.decimal = matchedGroup[\"scientificDec\"];\n extractedGroup.negativeInt = matchedGroup[\"negativeSignScientific\"] !== undefined;\n extractedGroup.exponent = matchedGroup[\"scientificExponent\"];\n break;\n case \"unit\":\n extractedGroup.integer = matchedGroup[\"unitInt\"];\n extractedGroup.decimal = matchedGroup[\"unitDec\"];\n extractedGroup.negativeInt = matchedGroup[\"negativeSignUnit\"] !== undefined;\n extractedGroup.unit = matchedGroup[\"unitName\"];\n extractedGroup.exponent = matchedGroup[\"unitCaretExponentPre\"] || matchedGroup[\"unitSuperExponentPre\"];\n extractedGroup.unitExponent = matchedGroup[\"unitCaretExponentPost\"] || matchedGroup[\"unitSuperExponentPost\"];\n break;\n case \"unitOnly\":\n extractedGroup.unit = matchedGroup[\"unitNameOnly\"];\n extractedGroup.unitExponent = matchedGroup[\"unitOnlyCaretExponent\"] || matchedGroup[\"unitOnlySuperExponent\"];\n break;\n case \"operator\":\n break;\n case \"number\":\n extractedGroup.integer = matchedGroup[\"integerInt\"];\n extractedGroup.decimal = matchedGroup[\"integerDec\"];\n extractedGroup.exponent = matchedGroup[\"integerSuperExponent\"] || matchedGroup[\"integerCaretExponent\"];\n extractedGroup.negativeInt = matchedGroup[\"negativeSignInteger\"] !== undefined;\n break;\n default:\n break;\n }\n\n extractedGroup.matchType = matchType;\n extractedGroup.input = matchedGroup[matchType];\n extractedGroup.index = match.index;\n\n if (matchType !== \"operator\" && matchType !== \"scientific\" && matchType !== \"unitOnly\")\n extractedGroup.integer = extractedGroup.integer !== undefined ? extractedGroup.integer.replace(/,/g, \"\") : \"0\";\n\n return extractedGroup;\n }\n\n return null;\n}\n\n/**\n * Extracts all matches of a number, currency, unit, or exponent in the given string\n * and returns an array of the extracted groups and additional information such as\n * the type of match and the index of the match in the string.\n *\n * If the input string contains no matches, an empty array is returned.\n *\n * @param {string} input - The string to search for matches\n * @returns {ExtractionResult[]} - The extracted groups and additional information, or an empty array if no match is found\n */\nexport function extractAllMatches(input: string): ExtractionResult[] {\n const results: ExtractionResult[] = [];\n let remainingInput = input;\n let currentExtraction = extractFirstMatch(remainingInput);\n\n while (currentExtraction !== null && currentExtraction.input) {\n const remainingLength = input.length - remainingInput.length;\n\n if (results.length > 0) {\n currentExtraction.index = remainingInput.indexOf(currentExtraction.input) + remainingLength;\n }\n\n results.push(currentExtraction);\n\n remainingInput = remainingInput.substring(\n remainingInput.indexOf(currentExtraction.input) + currentExtraction.input.length,\n );\n\n currentExtraction = extractFirstMatch(remainingInput);\n }\n\n return results;\n}\n","import { numbers } from \"../../config/default\";\n\n/**\n * Converts a number less than 1000 into words.\n * @param num The number to convert (0-999).\n * @returns The word representation of the number.\n */\n\nexport function zeroTo999(num: number): string {\n if (num === 0) {\n return \"\";\n }\n\n let words = \"\";\n\n if (num >= 100) {\n words += numbers.ones[Math.floor(num / 100)] + \" hundred\";\n num %= 100;\n if (num > 0) {\n words += \" \";\n }\n }\n\n if (num >= 20) {\n words += numbers.tens[Math.floor(num / 10)];\n num %= 10;\n if (num > 0) {\n words += \" \" + numbers.ones[num];\n }\n } else if (num >= 10) {\n words += numbers.teens[num - 10];\n } else if (num > 0) {\n words += numbers.ones[num];\n }\n\n return words;\n}\n","import { numbers } from \"../../config/default\";\nimport { zeroTo999 } from \"./zeroTo999\";\n\n/**\n * Converts a non-negative integer into its full English word representation.\n * @param num The integer to convert.\n * @returns The word representation of the number, or an error message for invalid input.\n */\n\nexport function positiveInteger(num: number): string {\n if (typeof num !== \"number\" || !Number.isInteger(num) || num < 0) {\n return \"Invalid input: Please provide a non-negative integer.\";\n }\n\n if (num === 0) {\n return \"zero\";\n }\n\n let words = \"\";\n let scaleIndex = 0;\n\n while (num > 0) {\n if (num % 1000 !== 0) {\n const upToHundreds = zeroTo999(num % 1000);\n const magnitudeScale = numbers.scales[scaleIndex] ? \" \" + numbers.scales[scaleIndex] : \"\";\n words = upToHundreds + magnitudeScale + (words ? \" \" + words : \"\");\n }\n num = Math.floor(num / 1000);\n scaleIndex++;\n }\n\n return words.trim().replace(/\\s+/g, \" \");\n}\n","import { positiveInteger } from \"./positiveInteger\";\n\n/**\n * Converts a given number of cents to words, provided it is a valid number between 0 and 99.\n * @param num The number of cents to convert, as a string.\n * @returns The word representation of the number of cents, or an empty string if the conversion failed.\n */\n\nexport function twoDigit(num: string): string {\n if (num.trim().length !== 2) return \"\";\n let parsed = parseInt(num);\n\n if (parsed < 100 && parsed >= 0) return positiveInteger(parsed);\n return \"\";\n}\n","export const negative = (bool: boolean): string => {\n return bool ? \"negative \" : \"\";\n};\n","import { currencies } from \"../config/default\";\nimport { Currency } from \"../interfaces/configurations/default\";\nimport { positiveInteger } from \"../utils/stringBuilding/positiveInteger\";\nimport { twoDigit } from \"../utils/stringBuilding/twoDigits\";\nimport { negative } from \"../utils/stringBuilding/negative\";\nimport { baseCurrency } from \"../interfaces/definitions\";\n\n/**\n * Converts a currency object into its spoken word representation.\n * @param {baseCurrency} amount - The currency object to convert.\n * @returns {string} The spoken word representation of the currency.\n */\nexport function convertCurrencyToSpokenWord(amount: baseCurrency): string {\n let sentence = \"\";\n const { integer, decimal, negativeInt, currency } = amount;\n\n let currencyConfig: Currency = currencies[currency];\n\n let parsedInteger = parseInt(integer);\n\n sentence += negative(negativeInt);\n sentence += positiveInteger(parsedInteger) + \" \";\n sentence += parsedInteger < 2 ? currencyConfig.singular : currencyConfig.plural + \" \";\n if (decimal !== undefined && currencyConfig.fraction !== null && currencyConfig.fraction !== undefined) {\n sentence += \"and \";\n sentence += twoDigit(decimal) + \" \";\n sentence += parseInt(decimal) < 2 ? currencyConfig.fraction.singular : currencyConfig.fraction.plural;\n }\n return sentence.trim();\n}\n","import { positiveInteger } from \"./positiveInteger\";\n\n/**\n * Converts each digit in a number to words, and returns them as a joined string.\n * @param num The number to convert, as a string.\n * @returns A string of space-separated words, where each word is a digit in the original number.\n * @example convertPerDigit(\"123\") => \"one two three\"\n */\n\nexport function perDigit(num: string): string {\n const words = [];\n for (let i = 0; i < num.length; i++) {\n words.push(positiveInteger(parseInt(num[i])));\n }\n return words.join(\" \");\n}\n","/**\n * Converts a string of superscript digits to regular integer string.\n * @param {string} superscriptString - String containing superscript digits.\n * @returns {string} - String of regular digits.\n */\nexport function toRegularInteger(superscriptString: string): string {\n const superscriptMap: { [key: string]: string } = {\n \"⁰\": \"0\",\n \"¹\": \"1\",\n \"²\": \"2\",\n \"³\": \"3\",\n \"⁴\": \"4\",\n \"⁵\": \"5\",\n \"⁶\": \"6\",\n \"⁷\": \"7\",\n \"⁸\": \"8\",\n \"⁹\": \"9\",\n };\n\n let standardDigitString = \"\";\n for (let char of superscriptString) {\n if (superscriptMap[char]) {\n standardDigitString += superscriptMap[char];\n } else {\n standardDigitString += char;\n }\n }\n\n return standardDigitString;\n}\n","import { toRegularInteger } from \"../parseSuperscript\";\nimport { positiveInteger } from \"./positiveInteger\";\n\n/** * Converts an exponent integer to its spoken word representation, * optionally using \"squared\" and \"cubed\" for exponents 2 and 3. * @param exponent The exponent value as an integer. * @param onlyUsePowerOf A boolean flag. If false, uses \"squared\" for 2 and \"cubed\" for 3. * If true, uses \"to the power of two\", \"to the power of three\", etc. * @returns The spoken word representation of the exponent. */\n\nexport function exponentSpokenWord(exponent: string, onlyUsePowerOf: boolean = false): string {\n const isNegative = exponent.startsWith(\"-\") || exponent.startsWith(\"⁻\");\n let newExponentString = toRegularInteger(isNegative ? exponent.slice(1) : exponent);\n if (!onlyUsePowerOf && !isNegative) {\n if (newExponentString === \"2\") {\n return \"squared\";\n }\n if (newExponentString === \"3\") {\n return \"cubed\";\n }\n }\n let res = \"to the power of \" + (isNegative ? \"negative \" : \"\") + positiveInteger(parseInt(newExponentString));\n return res;\n}\n","import { positiveInteger } from \"../utils/stringBuilding/positiveInteger\";\nimport { twoDigit } from \"../utils/stringBuilding/twoDigits\";\nimport { perDigit } from \"../utils/stringBuilding/perDigit\";\nimport { negative } from \"../utils/stringBuilding/negative\";\nimport { baseNumber } from \"../interfaces/definitions\";\nimport { exponentSpokenWord } from \"../utils/stringBuilding/exponent\";\n\n/**\n * Converts a number object into its spoken word representation.\n * @param {baseNumber} num - The number object to convert.\n * @returns {string} The spoken word representation of the number.\n */\nexport function convertNumberToSpokenWord(num: baseNumber): string {\n const { integer, decimal, negativeInt, exponent } = num;\n\n let sentence = negative(negativeInt);\n\n sentence += positiveInteger(parseInt(integer)) + \" \";\n\n if (decimal !== undefined) {\n sentence += \"point \";\n if (decimal.length === 1 || decimal.length > 2) {\n sentence += perDigit(decimal) + \" \";\n } else {\n sentence += twoDigit(decimal) + \" \";\n }\n }\n\n if (exponent !== undefined) {\n sentence += exponentSpokenWord(exponent, true);\n }\n return sentence.trim();\n}\n","import { units } from \"../config/default\";\nimport { baseNumberUnit } from \"../interfaces/definitions\";\nimport { Unit } from \"../interfaces/configurations/default\";\nimport { exponentSpokenWord } from \"../utils/stringBuilding/exponent\";\nimport { convertNumberToSpokenWord } from \"./convertNumberToSpokenWord\";\n\n/**\n * Converts a numeric unit object into its spoken word representation.\n * @param {baseNumberUnit} numericUnit - The numeric unit object to convert.\n * @returns {string} The spoken word representation of the numeric unit.\n */\nexport function convertNumericUnitToSpokenWord(numericUnit: baseNumberUnit): string {\n const { integer, decimal, unit, negativeInt, exponent, unitExponent } = numericUnit;\n\n let sentence = convertNumberToSpokenWord({\n integer,\n decimal,\n negativeInt,\n matchType: \"number\",\n input: \"\",\n index: 0,\n });\n\n let spokenUnit: Unit;\n\n let directUnitKey = unit + (unitExponent !== undefined ? unitExponent : \"\");\n\n let directUnit = units[directUnitKey];\n\n if (directUnit !== undefined) {\n spokenUnit = directUnit;\n } else {\n spokenUnit = units[unit];\n }\n\n if (spokenUnit === undefined) {\n return \"\";\n }\n\n let isPlural = parseFloat(integer + \".\" + decimal) > 1 && spokenUnit.plural;\n\n let spokenNumberExponent: string = \"\";\n let spokenUnitExponent: string = \"\";\n\n if (exponent !== undefined) {\n spokenNumberExponent = exponentSpokenWord(exponent, true);\n }\n\n if (unitExponent !== undefined && directUnit === undefined) {\n spokenUnitExponent = exponentSpokenWord(unitExponent);\n }\n\n sentence +=\n \" \" + spokenNumberExponent + \" \" + (isPlural ? spokenUnit.plural : spokenUnit.singular) + \" \" + spokenUnitExponent;\n\n sentence = sentence.trim().replace(/\\s+/g, \" \");\n\n return sentence;\n}\n","import { math } from \"../config/default\";\nimport { baseOperator } from \"../interfaces/definitions\";\n\n/**\n * Converts an operator object into its spoken word representation.\n * @param {baseOperator} operatorObject - The operator object to convert.\n * @returns {string} The spoken word representation of the operator.\n */\nexport function convertOperatorToSpokenWord(operatorObject: baseOperator): string {\n const { input } = operatorObject;\n if (input === undefined) {\n return \"\";\n }\n return math[input as keyof typeof math];\n}\n","import { convertNumberToSpokenWord } from \"./convertNumberToSpokenWord\";\nimport { toRegularInteger } from \"../utils/parseSuperscript\";\nimport { baseScientific } from \"../interfaces/definitions\";\n\n/**\n * Converts a scientific expression object into its spoken word representation.\n * @param {baseScientific} expression - The scientific expression object to convert.\n * @returns {string} The spoken word representation of the scientific expression.\n */\nexport function convertScientificExpressionToSpokenWord(expression: baseScientific): string {\n const { integer, decimal, exponent, negativeInt } = expression;\n\n const isNegativeExponent = exponent.startsWith(\"-\") || exponent.startsWith(\"⁻\");\n\n let E = \"times ten to the power of \";\n\n let sentence =\n convertNumberToSpokenWord({\n integer,\n decimal,\n negativeInt,\n matchType: \"number\",\n input: \"\",\n index: 0,\n }) +\n \" \" +\n E +\n convertNumberToSpokenWord({\n decimal: undefined,\n negativeInt: isNegativeExponent,\n integer: toRegularInteger(isNegativeExponent ? exponent.slice(1) : exponent),\n matchType: \"number\",\n input: \"\",\n index: 0,\n });\n\n return sentence.trim();\n}\n","import { units } from \"../config/default\";\nimport { Unit } from \"../interfaces/configurations/default\";\nimport { exponentSpokenWord } from \"../utils/stringBuilding/exponent\";\nimport { baseUnitOnly } from \"../interfaces/definitions\";\n\n/**\n * Converts a unit-only object into its spoken word representation.\n * @param {baseUnitOnly} unitOnlyObject - The unit-only object to convert.\n * @returns {string} The spoken word representation of the unit.\n */\nexport function convertUnitOnlyToSpokenWord(unitOnlyObject: baseUnitOnly): string {\n const { unit, unitExponent } = unitOnlyObject;\n\n let spokenUnit: Unit;\n\n spokenUnit = units[unit];\n\n let result: string = \"\";\n if (spokenUnit === undefined) {\n return \"\";\n }\n\n if (unitExponent !== undefined) {\n result = spokenUnit.singular + \" \" + exponentSpokenWord(unitExponent);\n } else {\n result = spokenUnit.singular;\n }\n return result;\n}\n","import { ExtractionResult } from \"../interfaces/definitions\";\n\nfunction isValidIntegerString(str: string | undefined, allowNegative: boolean = false): boolean {\n if (str === undefined) {\n return true;\n }\n let regex;\n if (allowNegative) {\n regex = /^(?:[\\u207B\\u002D]?[\\d\\u2070-\\u2079]+)$/;\n } else {\n regex = /^[\\d\\u2070-\\u2079]+$/;\n }\n return regex.test(str);\n}\n\n/**\n * Validates an ExtractionResult object.\n *\n * Checks that the object is present, contains the required properties, and that\n * the values of those properties are of the correct type.\n *\n * If the object is invalid, throws an Error with a description of the problem.\n *\n * @param {ExtractionResult} extractionResult - The object to validate.\n */\nexport function validateExtractionResult(extractionResult: ExtractionResult): void {\n if (!extractionResult) {\n throw new Error(\"validateExtractionResult: ExtractionResult cannot be null or undefined.\");\n }\n\n if (typeof extractionResult !== \"object\") {\n throw new Error(\"validateExtractionResult: ExtractionResult must be an object.\");\n }\n\n if (!(\"input\" in extractionResult)) {\n throw new Error(\"validateExtractionResult: ExtractionResult is missing the 'input' property.\");\n }\n if (typeof extractionResult.input !== \"string\") {\n throw new Error(\"validateExtractionResult: ExtractionResult 'input' property must be a string.\");\n }\n\n if (!(\"matchType\" in extractionResult)) {\n throw new Error(\"validateExtractionResult: ExtractionResult is missing the 'matchType' property.\");\n }\n if (typeof extractionResult.matchType !== \"string\") {\n throw new Error(\"validateExtractionResult: ExtractionResult 'matchType' property must be a string.\");\n }\n\n if (!(\"index\" in extractionResult)) {\n throw new Error(\"validateExtractionResult: ExtractionResult is missing the 'index' property.\");\n }\n if (typeof extractionResult.index !== \"number\") {\n throw new Error(\"validateExtractionResult: ExtractionResult 'index' property must be a number.\");\n }\n\n const { matchType } = extractionResult;\n\n switch (matchType) {\n case \"number\":\n if (!(\"integer\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult is missing the 'integer' property.\",\n );\n }\n if (typeof extractionResult.integer !== \"string\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'integer' property must be a string.\",\n );\n }\n if (!isValidIntegerString(extractionResult.integer)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'integer' property must contain only integers.\",\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n typeof extractionResult.decimal !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'decimal' property must be a string if present.\",\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n !isValidIntegerString(extractionResult.decimal)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'decimal' property must contain only integers.\",\n );\n }\n if (!(\"negativeInt\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult is missing the 'negativeInt' property.\",\n );\n }\n if (typeof extractionResult.negativeInt !== \"boolean\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'negativeInt' property must be a boolean.\",\n );\n }\n if (\n \"exponent\" in extractionResult &&\n extractionResult.exponent !== undefined &&\n typeof extractionResult.exponent !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'exponent' property must be a string if present.\",\n );\n }\n if (\n \"exponent\" in extractionResult &&\n extractionResult.exponent !== undefined &&\n !isValidIntegerString(extractionResult.exponent, true)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'exponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).\",\n );\n }\n break;\n\n case \"symbolCurrency\":\n case \"codeCurrency\":\n if (!(\"integer\" in extractionResult)) {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult is missing the 'integer' property.`,\n );\n }\n if (typeof extractionResult.integer !== \"string\") {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult 'integer' property must be a string.`,\n );\n }\n if (!isValidIntegerString(extractionResult.integer)) {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult 'integer' property must contain only integers.`,\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n typeof extractionResult.decimal !== \"string\"\n ) {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult 'decimal' property must be a string if present.`,\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n !isValidIntegerString(extractionResult.decimal)\n ) {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult 'decimal' property must contain only integers.`,\n );\n }\n if (!(\"negativeInt\" in extractionResult)) {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult is missing the 'negativeInt' property.`,\n );\n }\n if (typeof extractionResult.negativeInt !== \"boolean\") {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult 'negativeInt' property must be a boolean.`,\n );\n }\n if (!(\"currency\" in extractionResult)) {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult is missing the 'currency' property.`,\n );\n }\n if (typeof extractionResult.currency !== \"string\") {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult 'currency' property must be a string.`,\n );\n }\n break;\n\n case \"unit\":\n if (!(\"integer\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult is missing the 'integer' property.\",\n );\n }\n if (typeof extractionResult.integer !== \"string\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'integer' property must be a string.\",\n );\n }\n if (!isValidIntegerString(extractionResult.integer)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'integer' property must contain only integers.\",\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n typeof extractionResult.decimal !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'decimal' property must be a string if present.\",\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n !isValidIntegerString(extractionResult.decimal)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'decimal' property must contain only integers.\",\n );\n }\n if (!(\"negativeInt\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult is missing the 'negativeInt' property.\",\n );\n }\n if (typeof extractionResult.negativeInt !== \"boolean\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'negativeInt' property must be a boolean.\",\n );\n }\n if (!(\"unit\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult is missing the 'unit' property.\",\n );\n }\n if (typeof extractionResult.unit !== \"string\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'unit' property must be a string.\",\n );\n }\n if (\n \"exponent\" in extractionResult &&\n extractionResult.exponent !== undefined &&\n typeof extractionResult.exponent !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'exponent' property must be a string if present.\",\n );\n }\n if (\n \"exponent\" in extractionResult &&\n extractionResult.exponent !== undefined &&\n !isValidIntegerString(extractionResult.exponent, true)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'exponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).\",\n );\n }\n if (\n \"unitExponent\" in extractionResult &&\n extractionResult.unitExponent !== undefined &&\n typeof extractionResult.unitExponent !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'unitExponent' property must be a string if present.\",\n );\n }\n if (\n \"unitExponent\" in extractionResult &&\n extractionResult.unitExponent !== undefined &&\n !isValidIntegerString(extractionResult.unitExponent, true)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'unitExponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).\",\n );\n }\n break;\n\n case \"unitOnly\":\n if (!(\"unit\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unitOnly', ExtractionResult is missing the 'unit' property.\",\n );\n }\n if (typeof extractionResult.unit !== \"string\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'unitOnly', ExtractionResult 'unit' property must be a string.\",\n );\n }\n if (\n \"unitExponent\" in extractionResult &&\n extractionResult.unitExponent !== undefined &&\n typeof extractionResult.unitExponent !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unitOnly', ExtractionResult 'unitExponent' property must be a string if present.\",\n );\n }\n if (\n \"unitExponent\" in extractionResult &&\n extractionResult.unitExponent !== undefined &&\n !isValidIntegerString(extractionResult.unitExponent, true)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unitOnly', ExtractionResult 'unitExponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).\",\n );\n }\n break;\n\n case \"operator\":\n break; // No specific properties to validate for operator\n\n case \"scientific\":\n if (!(\"integer\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult is missing the 'integer' property.\",\n );\n }\n if (typeof extractionResult.integer !== \"string\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'integer' property must be a string.\",\n );\n }\n if (!isValidIntegerString(extractionResult.integer)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'integer' property must contain only integers.\",\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n typeof extractionResult.decimal !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'decimal' property must be a string if present.\",\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n !isValidIntegerString(extractionResult.decimal)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'decimal' property must contain only integers.\",\n );\n }\n if (!(\"negativeInt\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult is missing the 'negativeInt' property.\",\n );\n }\n if (typeof extractionResult.negativeInt !== \"boolean\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'negativeInt' property must be a boolean.\",\n );\n }\n if (!(\"exponent\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult is missing the 'exponent' property.\",\n );\n }\n if (extractionResult.exponent !== undefined && typeof extractionResult.exponent !== \"string\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'exponent' property must be a string.\",\n );\n }\n if (extractionResult.exponent !== undefined && !isValidIntegerString(extractionResult.exponent, true)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'exponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).\",\n );\n }\n break;\n\n default:\n throw new Error(`validateExtractionResult: Unknown matchType: ${matchType}`);\n }\n}\n","import { extractFirstMatch, extractAllMatches } from \"./utils/extraction/patternExtractor\";\nimport { convertCurrencyToSpokenWord } from \"./converters/convertCurrencyToSpokenWord\";\nimport { convertNumberToSpokenWord } from \"./converters/convertNumberToSpokenWord\";\nimport { convertNumericUnitToSpokenWord } from \"./converters/convertNumericUnitToSpokenWord\";\nimport { convertOperatorToSpokenWord } from \"./converters/convertOperatorToSpokenWord\";\nimport { convertScientificExpressionToSpokenWord } from \"./converters/convertScientificExpressionToSpokenWord\";\nimport { convertUnitOnlyToSpokenWord } from \"./converters/convertUnitOnlyToSpokenWord\";\n\nimport type {\n baseCurrency,\n baseNumber,\n baseNumberUnit,\n baseOperator,\n baseScientific,\n baseUnitOnly,\n ExtractionResult,\n} from \"./interfaces/definitions\";\n\nimport { validateExtractionResult } from \"./utils/validateExtractionResultObject\";\n\n/**\n * @namespace extractQuantities\n * @description Contains functions for extracting numeric data from a string.\n */\nconst extractQuantities = {\n /**\n * Extracts the first match (number || currency || unit || operator || scientific expression) from the input string.\n * @param {string} input - The string to extract from.\n * @returns {ExtractionResult | null} The extracted data or null if no match is found.\n */\n firstMatch: extractFirstMatch,\n /**\n * Extracts all matches (number || currency || unit || operator || scientific expression) from the input string.\n * @param {string} input - The string to extract from.\n * @returns {ExtractionResult[]} The extracted data.\n */\n allMatches: extractAllMatches,\n};\n\n/**\n * @namespace convertQuantities\n * @description Contains functions for converting (number || currency || unit || operator || scientific expression) data from a string or object to spoken word.\n */\nconst convertQuantities = {\n /**\n * Translates an ExtractionResult object (number || currency || unit || operator || scientific expression) into its spoken word equivalent.\n *\n * @param {ExtractionResult} extractionResult - The ExtractionResult object to translate.\n * @returns {string} The spoken word equivalent of the ExtractionResult.\n */\n translateMatch: (extractionResult: ExtractionResult): string => {\n let result: string = \"\";\n\n switch (extractionResult.matchType) {\n case \"number\":\n result = convertNumberToSpokenWord(extractionResult as baseNumber);\n break;\n\n case \"symbolCurrency\":\n result = convertCurrencyToSpokenWord(extractionResult as baseCurrency);\n break;\n case \"codeCurrency\":\n result = convertCurrencyToSpokenWord(extractionResult as baseCurrency);\n break;\n case \"unit\":\n result = convertNumericUnitToSpokenWord(extractionResult as baseNumberUnit);\n break;\n case \"unitOnly\":\n result = convertUnitOnlyToSpokenWord(extractionResult as baseUnitOnly);\n break;\n case \"operator\":\n result = convertOperatorToSpokenWord(extractionResult as baseOperator);\n break;\n case \"scientific\":\n result = convertScientificExpressionToSpokenWord(extractionResult as baseScientific);\n break;\n\n default:\n break;\n }\n return result;\n },\n\n /**\n * Extracts the first match (number || currency || unit || operator || scientific expression) from the input string\n * and translates it to its spoken word equivalent.\n *\n * @param {string} input - The string to extract and translate from.\n * @returns {string} The input string with the first match replaced by its spoken word equivalent,\n * or an empty string if no match is found.\n */\n autoReplaceFirstMatch: (input: string): string => {\n const match = extractFirstMatch(input);\n if (!match) return \"\";\n return input.replace(match.input, convertQuantities.translateMatch(match));\n },\n\n /**\n * Extracts all matches (number || currency || unit || operator || scientific expression) from the input string\n * and translates them to their spoken word equivalents.\n *\n * @param {string} input - The string to extract and translate from.\n * @returns {string} The input string with all matches replaced by their spoken word equivalents. Returns the original string if no matches are found.\n */\n autoReplaceAllMatches: (input: string): string => {\n const matches = extractAllMatches(input);\n\n if (matches.length === 0) {\n return input;\n }\n\n let output = \"\";\n let lastIndex = 0;\n\n for (const match of matches) {\n output += input.substring(lastIndex, match.index);\n output += convertQuantities.translateMatch(match);\n lastIndex = match.index + match.input.length;\n }\n\n output += input.substring(lastIndex);\n return output.replace(/\\s+/g, \" \").trim();\n },\n};\n\nconsole.log(convertQuantities.autoReplaceAllMatches(\"25 EUR\"));\n\nexport { convertQuantities, extractQuantities, validateExtractionResult };\nexport type { ExtractionResult, baseCurrency, baseNumber, baseNumberUnit, baseOperator, baseScientific, baseUnitOnly };\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/config/default.ts","../src/utils/extraction/regexPatterns.ts","../src/utils/extraction/patternExtractor.ts","../src/utils/stringBuilding/zeroTo999.ts","../src/utils/stringBuilding/positiveInteger.ts","../src/utils/stringBuilding/twoDigits.ts","../src/utils/stringBuilding/negative.ts","../src/converters/convertCurrencyToSpokenWord.ts","../src/utils/stringBuilding/perDigit.ts","../src/utils/parseSuperscript.ts","../src/utils/stringBuilding/exponent.ts","../src/converters/convertNumberToSpokenWord.ts","../src/converters/convertNumericUnitToSpokenWord.ts","../src/converters/convertOperatorToSpokenWord.ts","../src/converters/convertScientificExpressionToSpokenWord.ts","../src/converters/convertUnitOnlyToSpokenWord.ts","../src/utils/validateExtractionResultObject.ts","../src/index.ts"],"names":[],"mappings":";;;AAEO,IAAM,KAAiC,GAAA;AAAA;AAAA,EAE5C,CAAG,EAAA,EAAE,QAAU,EAAA,OAAA,EAAS,QAAQ,QAAS,EAAA;AAAA,EACzC,GAAK,EAAA,EAAE,QAAU,EAAA,SAAA,EAAW,QAAQ,SAAU,EAAA;AAAA,EAC9C,EAAI,EAAA,EAAE,QAAU,EAAA,YAAA,EAAc,QAAQ,aAAc,EAAA;AAAA,EACpD,EAAI,EAAA,EAAE,QAAU,EAAA,YAAA,EAAc,QAAQ,aAAc,EAAA;AAAA,EACpD,EAAI,EAAA,EAAE,QAAU,EAAA,WAAA,EAAa,QAAQ,YAAa,EAAA;AAAA,EAClD,EAAI,EAAA,EAAE,QAAU,EAAA,MAAA,EAAQ,QAAQ,QAAS,EAAA;AAAA,EACzC,EAAI,EAAA,EAAE,QAAU,E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AK,CAAA;AACrC,IAAI,IAAA,CAAC,OAAc,OAAA,EAAA;AACnB,IAAA,OAAO,MAAM,OAAQ,CAAA,KAAA,CAAM,OAAO,iBAAkB,CAAA,cAAA,CAAe,KAAK,CAAC,CAAA;AAAA,GAC3E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,qBAAA,EAAuB,CAAC,KAA0B,KAAA;AAChD,IAAM,MAAA,OAAA,GAAU,kBAAkB,KAAK,CAAA;AAEvC,IAAI,IAAA,OAAA,CAAQ,WAAW,CAAG,EAAA;AACxB,MAAO,OAAA,KAAA;AAAA;AAGT,IAAA,IAAI,MAAS,GAAA,EAAA;AACb,IAAA,IAAI,SAAY,GAAA,CAAA;AAEhB,IAAA,KAAA,MAAW,SAAS,OAAS,EAAA;AAC3B,MAAA,MAAA,IAAU,KAAM,CAAA,SAAA,CAAU,SAAW,EAAA,KAAA,CAAM,KAAK,CAAA;AAChD,MAAU,MAAA,IAAA,iBAAA,CAAkB,eAAe,KAAK,CAAA;AAChD,MAAY,SAAA,GAAA,KAAA,CAAM,KAAQ,GAAA,KAAA,CAAM,KAAM,CAAA,MAAA;AAAA;AAGxC,IAAU,MAAA,IAAA,KAAA,CAAM,UAAU,SAAS,CAAA;AACnC,IAAA,OAAO,MAAO,CAAA,OAAA,CAAQ,MAAQ,EAAA,GAAG,EAAE,IAAK,EAAA;AAAA;AAE5C;AAEA,OAAA,CAAQ,GAAI,CAAA,iBAAA,CAAkB,qBAAsB,CAAA,QAAQ,CAAC,CAAA","file":"index.cjs","sourcesContent":["import { Currency, Unit } from \"../interfaces/configurations/default\";\n\nexport const units: { [key: string]: Unit } = {\n // Base units\n m: { singular: \"meter\", plural: \"meters\" },\n \"%\": { singular: \"percent\", plural: \"percent\" },\n cm: { singular: \"centimeter\", plural: \"centimeters\" },\n mm: { singular: \"millimeter\", plural: \"millimeters\" },\n km: { singular: \"kilometer\", plural: \"kilometers\" },\n in: { singular: \"inch\", plural: \"inches\" },\n ft: { singular: \"foot\", plural: \"feet\" },\n yd: { singular: \"yard\", plural: \"yards\" },\n mi: { singular: \"mile\", plural: \"miles\" },\n g: { singular: \"gram\", plural: \"grams\" },\n mg: { singular: \"milligram\", plural: \"milligrams\" },\n kg: { singular: \"kilogram\", plural: \"kilograms\" },\n L: { singular: \"liter\", plural: \"liters\" },\n mL: { singular: \"milliliter\", plural: \"milliliters\" },\n s: { singular: \"second\", plural: \"seconds\" },\n min: { singular: \"minute\", plural: \"minutes\" },\n h: { singular: \"hour\", plural: \"hours\" },\n\n // Additional Time Units\n d: { singular: \"day\", plural: \"days\" },\n wk: { singular: \"week\", plural: \"weeks\" },\n mo: { singular: \"month\", plural: \"months\" },\n yr: { singular: \"year\", plural: \"years\" },\n\n // Additional Length Units\n μm: { singular: \"micrometer\", plural: \"micrometers\" },\n nm: { singular: \"nanometer\", plural: \"nanometers\" },\n nmi: { singular: \"nautical mile\", plural: \"nautical miles\" },\n\n // Additional Mass Units\n μg: { singular: \"microgram\", plural: \"micrograms\" },\n t: { singular: \"tonne\", plural: \"tonnes\" },\n lb: { singular: \"pound\", plural: \"pounds\" },\n oz: { singular: \"ounce\", plural: \"ounces\" },\n st: { singular: \"stone\", plural: \"stones\" },\n\n // Volume Units\n \"cm³\": { singular: \"cubic centimeter\", plural: \"cubic centimeters\" },\n gal: { singular: \"gallon\", plural: \"gallons\" },\n pt: { singular: \"pint\", plural: \"pints\" },\n qt: { singular: \"quart\", plural: \"quarts\" },\n \"fl oz\": { singular: \"fluid ounce\", plural: \"fluid ounces\" },\n \"ft³\": { singular: \"cubic foot\", plural: \"cubic feet\" },\n \"in³\": { singular: \"cubic inch\", plural: \"cubic inches\" },\n bbl: { singular: \"barrel\", plural: \"barrels\" },\n\n // Area Units\n \"m²\": { singular: \"square meter\", plural: \"square meters\" },\n \"km²\": { singular: \"square kilometer\", plural: \"square kilometers\" },\n \"cm²\": { singular: \"square centimeter\", plural: \"square centimeters\" },\n \"mm²\": { singular: \"square millimeter\", plural: \"square millimeters\" },\n ha: { singular: \"hectare\", plural: \"hectares\" },\n \"ft²\": { singular: \"square foot\", plural: \"square feet\" },\n \"in²\": { singular: \"square inch\", plural: \"square inches\" },\n ac: { singular: \"acre\", plural: \"acres\" },\n\n // Angle Units\n rad: { singular: \"radian\", plural: \"radians\" },\n deg: { singular: \"degree\", plural: \"degrees\" },\n grad: { singular: \"gradian\", plural: \"gradians\" },\n\n // Temperature Units\n K: { singular: \"kelvin\", plural: \"kelvins\" },\n \"°C\": { singular: \"degree Celsius\", plural: \"degrees Celsius\" },\n \"°F\": { singular: \"degree Fahrenheit\", plural: \"degrees Fahrenheit\" },\n\n // Speed Units\n \"m/s\": { singular: \"meter per second\", plural: \"meters per second\" },\n \"m/s²\": {\n singular: \"meter per second squared\",\n plural: \"meters per second squared\",\n },\n \"km/h\": { singular: \"kilometer per hour\", plural: \"kilometers per hour\" },\n \"km/L\": { singular: \"kilometer per liter\", plural: \"kilometers per liter\" },\n mph: { singular: \"mile per hour\", plural: \"miles per hour\" },\n \"ft/s\": { singular: \"foot per second\", plural: \"feet per second\" },\n kn: { singular: \"knot\", plural: \"knots\" },\n mach: { singular: \"mach\", plural: \"\" },\n c: { singular: \"speed of light\", plural: \"\" },\n\n // Force Units\n N: { singular: \"newton\", plural: \"newtons\" },\n kgf: { singular: \"kilogram-force\", plural: \"\" },\n lbf: { singular: \"pound-force\", plural: \"\" },\n dyn: { singular: \"dyne\", plural: \"dynes\" },\n\n // Pressure Units\n Pa: { singular: \"pascal\", plural: \"pascals\" },\n kPa: { singular: \"kilopascal\", plural: \"kilopascals\" },\n MPa: { singular: \"megapascal\", plural: \"megapascals\" },\n bar: { singular: \"bar\", plural: \"bars\" },\n atm: { singular: \"atmosphere\", plural: \"atmospheres\" },\n mmHg: { singular: \"millimeter of mercury\", plural: \"millimeters of mercury\" },\n inHg: { singular: \"inch of mercury\", plural: \"inches of mercury\" },\n psi: { singular: \"pound per square inch\", plural: \"pounds per square inch\" },\n \"N/m²\": {\n singular: \"newton per square meter\",\n plural: \"newtons per square meter\",\n },\n \"kg/m²\": {\n singular: \"kilogram per square meter\",\n plural: \"kilograms per square meter\",\n },\n\n // Energy Units\n J: { singular: \"joule\", plural: \"joules\" },\n kJ: { singular: \"kilojoule\", plural: \"kilojoules\" },\n MJ: { singular: \"megajoule\", plural: \"megajoules\" },\n cal: { singular: \"calorie\", plural: \"calories\" },\n kcal: { singular: \"kilocalorie\", plural: \"kilocalories\" },\n eV: { singular: \"electron volt\", plural: \"electron volts\" },\n BTU: { singular: \"British thermal unit\", plural: \"British thermal units\" },\n kWh: { singular: \"kilowatt hour\", plural: \"kilowatt hours\" },\n\n // Power Units\n W: { singular: \"watt\", plural: \"watts\" },\n kW: { singular: \"kilowatt\", plural: \"kilowatts\" },\n MW: { singular: \"megawatt\", plural: \"megawatts\" },\n hp: { singular: \"horsepower\", plural: \"\" },\n\n // Frequency Units\n Hz: { singular: \"hertz\", plural: \"\" },\n kHz: { singular: \"kilohertz\", plural: \"\" },\n MHz: { singular: \"megahertz\", plural: \"\" },\n GHz: { singular: \"gigahertz\", plural: \"\" },\n rpm: { singular: \"revolution per minute\", plural: \"revolutions per minute\" },\n \"rad/s\": { singular: \"radian per second\", plural: \"radians per second\" },\n \"deg/s\": { singular: \"degree per second\", plural: \"degrees per second\" },\n\n // Electrical Units\n V: { singular: \"volt\", plural: \"volts\" },\n mV: { singular: \"millivolt\", plural: \"millivolts\" },\n μV: { singular: \"microvolt\", plural: \"microvolts\" },\n kV: { singular: \"kilovolt\", plural: \"kilovolts\" },\n A: { singular: \"ampere\", plural: \"amperes\" },\n mA: { singular: \"milliampere\", plural: \"milliamperes\" },\n μA: { singular: \"microampere\", plural: \"microamperes\" },\n Ω: { singular: \"ohm\", plural: \"ohms\" },\n kΩ: { singular: \"kilohm\", plural: \"kilohms\" },\n MΩ: { singular: \"megohm\", plural: \"megohms\" },\n F: { singular: \"farad\", plural: \"farads\" },\n μF: { singular: \"microfarad\", plural: \"microfarads\" },\n nF: { singular: \"nanofarad\", plural: \"nanofarads\" },\n pF: { singular: \"picofarad\", plural: \"picofarads\" },\n H: { singular: \"henry\", plural: \"henries\" },\n mH: { singular: \"millihenry\", plural: \"millihenries\" },\n μH: { singular: \"microhenry\", plural: \"microhenries\" },\n S: { singular: \"siemens\", plural: \"\" },\n \"S/m\": { singular: \"siemens per meter\", plural: \"\" },\n \"F/m\": { singular: \"farad per meter\", plural: \"farads per meter\" },\n \"Ω·m\": { singular: \"ohm meter\", plural: \"ohm meters\" },\n \"V/m\": { singular: \"volt per meter\", plural: \"volts per meter\" },\n \"A/m\": { singular: \"ampere per meter\", plural: \"amperes per meter\" },\n\n // Magnetic Units\n T: { singular: \"tesla\", plural: \"teslas\" },\n mT: { singular: \"millitesla\", plural: \"milliteslas\" },\n μT: { singular: \"microtesla\", plural: \"microteslas\" },\n G: { singular: \"gauss\", plural: \"\" },\n Wb: { singular: \"weber\", plural: \"webers\" },\n mWb: { singular: \"milliweber\", plural: \"milliwebers\" },\n μWb: { singular: \"microweber\", plural: \"microwebers\" },\n\n // Density Units\n \"kg/m³\": {\n singular: \"kilogram per cubic meter\",\n plural: \"kilograms per cubic meter\",\n },\n \"g/cm³\": {\n singular: \"gram per cubic centimeter\",\n plural: \"grams per cubic centimeter\",\n },\n \"g/mL\": { singular: \"gram per milliliter\", plural: \"grams per milliliter\" },\n \"lb/ft³\": {\n singular: \"pound per cubic foot\",\n plural: \"pounds per cubic foot\",\n },\n \"lb/in³\": {\n singular: \"pound per cubic inch\",\n plural: \"pounds per cubic inch\",\n },\n sg: { singular: \"specific gravity\", plural: \"\" },\n\n // Volumetric Flow Units\n \"m³/s\": {\n singular: \"cubic meter per second\",\n plural: \"cubic meters per second\",\n },\n \"L/s\": { singular: \"liter per second\", plural: \"liters per second\" },\n \"L/min\": { singular: \"liter per minute\", plural: \"liters per minute\" },\n \"L/h\": { singular: \"liter per hour\", plural: \"liters per hour\" },\n \"gal/min\": { singular: \"gallon per minute\", plural: \"gallons per minute\" },\n \"ft³/s\": {\n singular: \"cubic foot per second\",\n plural: \"cubic feet per second\",\n },\n \"bbl/d\": { singular: \"barrel per day\", plural: \"barrels per day\" },\n\n // Fuel Economy Units\n \"L/100km\": { singular: \"liter per 100 kilometers\", plural: \"\" },\n mpg: { singular: \"mile per gallon\", plural: \"miles per gallon\" },\n mpg_imp: {\n singular: \"mile per gallon imperial\",\n plural: \"miles per gallon imperial\",\n },\n \"L/km\": { singular: \"liter per kilometer\", plural: \"liters per kilometer\" },\n \"L/m\": { singular: \"liter per meter\", plural: \"liters per meter\" },\n\n // Concentration Units\n ppm: { singular: \"part per million\", plural: \"parts per million\" },\n ppb: { singular: \"part per billion\", plural: \"parts per billion\" },\n ppt: { singular: \"part per trillion\", plural: \"parts per trillion\" },\n \"mol/L\": { singular: \"mole per liter\", plural: \"moles per liter\" },\n \"mol/m³\": {\n singular: \"mole per cubic meter\",\n plural: \"moles per cubic meter\",\n },\n \"mg/L\": { singular: \"milligram per liter\", plural: \"milligrams per liter\" },\n \"g/L\": { singular: \"gram per liter\", plural: \"grams per liter\" },\n \"mg/kg\": {\n singular: \"milligram per kilogram\",\n plural: \"milligrams per kilogram\",\n },\n\n // Illumination Units\n lm: { singular: \"lumen\", plural: \"lumens\" },\n cd: { singular: \"candela\", plural: \"candelas\" },\n lx: { singular: \"lux\", plural: \"\" },\n \"ft-cd\": { singular: \"foot-candle\", plural: \"foot-candles\" },\n\n // Radiation Units\n Bq: { singular: \"becquerel\", plural: \"becquerels\" },\n Ci: { singular: \"curie\", plural: \"curies\" },\n Sv: { singular: \"sievert\", plural: \"sieverts\" },\n Gy: { singular: \"gray\", plural: \"grays\" },\n\n // Catalytic Activity Units\n kat: { singular: \"katal\", plural: \"katals\" },\n U: { singular: \"enzyme unit\", plural: \"enzyme units\" },\n\n // Viscosity and Fluid Properties Units\n \"Pa·s\": { singular: \"pascal second\", plural: \"pascal seconds\" },\n cP: { singular: \"centipoise\", plural: \"\" },\n \"kg/(m·s)\": {\n singular: \"kilogram per meter second\",\n plural: \"kilograms per meter second\",\n },\n \"lb/(ft·s)\": {\n singular: \"pound per foot second\",\n plural: \"pounds per foot second\",\n },\n \"m²/s\": {\n singular: \"square meter per second\",\n plural: \"square meters per second\",\n },\n St: { singular: \"stokes\", plural: \"\" },\n cSt: { singular: \"centistokes\", plural: \"\" },\n \"N/m\": { singular: \"newton per meter\", plural: \"newtons per meter\" },\n \"dyn/cm\": { singular: \"dyne per centimeter\", plural: \"dynes per centimeter\" },\n\n // Thermal Properties Units\n \"W/(m·K)\": {\n singular: \"watt per meter kelvin\",\n plural: \"watts per meter kelvin\",\n },\n \"cal/(cm·s·°C)\": {\n singular: \"calorie per centimeter second degree Celsius\",\n plural: \"calories per centimeter second degree Celsius\",\n },\n \"J/(kg·K)\": {\n singular: \"joule per kilogram kelvin\",\n plural: \"joules per kilogram kelvin\",\n },\n \"cal/(g·°C)\": {\n singular: \"calorie per gram degree Celsius\",\n plural: \"calories per gram degree Celsius\",\n },\n \"1/K\": { singular: \"per kelvin\", plural: \"\" },\n \"1/°C\": { singular: \"per degree Celsius\", plural: \"\" },\n \"W/m²\": {\n singular: \"watt per square meter\",\n plural: \"watts per square meter\",\n },\n \"cal/(cm²·s)\": {\n singular: \"calorie per square centimeter second\",\n plural: \"calories per square centimeter second\",\n },\n \"W/(m²·K)\": {\n singular: \"watt per square meter kelvin\",\n plural: \"watts per square meter kelvin\",\n },\n \"cal/(cm²·s·°C)\": {\n singular: \"calorie per square centimeter second degree Celsius\",\n plural: \"calories per square centimeter second degree Celsius\",\n },\n \"K/W\": { singular: \"kelvin per watt\", plural: \"kelvins per watt\" },\n \"°C/W\": {\n singular: \"degree Celsius per watt\",\n plural: \"degrees Celsius per watt\",\n },\n\n // Data Transfer and Storage Units\n b: { singular: \"bit\", plural: \"bits\" },\n B: { singular: \"byte\", plural: \"bytes\" },\n kb: { singular: \"kilobit\", plural: \"kilobits\" },\n kB: { singular: \"kilobyte\", plural: \"kilobytes\" },\n Mb: { singular: \"megabit\", plural: \"megabits\" },\n MB: { singular: \"megabyte\", plural: \"megabytes\" },\n Gb: { singular: \"gigabit\", plural: \"gigabits\" },\n GB: { singular: \"gigabyte\", plural: \"gigabytes\" },\n Tb: { singular: \"terabit\", plural: \"terabits\" },\n TB: { singular: \"terabyte\", plural: \"terabytes\" },\n bps: { singular: \"bit per second\", plural: \"bits per second\" },\n kbps: { singular: \"kilobit per second\", plural: \"kilobits per second\" },\n Mbps: { singular: \"megabit per second\", plural: \"megabits per second\" },\n Gbps: { singular: \"gigabit per second\", plural: \"gigabits per second\" },\n};\n\nexport const numbers = {\n ones: [\"\", \"one\", \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\", \"nine\"],\n teens: [\"ten\", \"eleven\", \"twelve\", \"thirteen\", \"fourteen\", \"fifteen\", \"sixteen\", \"seventeen\", \"eighteen\", \"nineteen\"],\n tens: [\"\", \"\", \"twenty\", \"thirty\", \"forty\", \"fifty\", \"sixty\", \"seventy\", \"eighty\", \"ninety\"],\n scales: [\"\", \"thousand\", \"million\", \"billion\", \"trillion\", \"quadrillion\", \"quintillion\"],\n ordinals: {\n one: \"first\",\n two: \"second\",\n three: \"third\",\n five: \"fifth\",\n eight: \"eighth\",\n nine: \"ninth\",\n twelve: \"twelfth\",\n },\n};\n\nexport const currencySymbols: { [key: string]: Currency } = {\n $: {\n singular: \"dollar\",\n plural: \"dollars\",\n fraction: { singular: \"cent\", plural: \"cents\" },\n },\n \"€\": {\n singular: \"euro\",\n plural: \"euros\",\n fraction: { singular: \"cent\", plural: \"cents\" },\n },\n \"£\": {\n singular: \"pound\",\n plural: \"pounds\",\n fraction: { singular: \"penny\", plural: \"pence\" },\n },\n \"¥\": {\n singular: \"yen\",\n plural: \"yen\",\n fraction: null,\n },\n \"₹\": {\n singular: \"rupee\",\n plural: \"rupees\",\n fraction: { singular: \"paisa\", plural: \"paise\" },\n },\n};\n\n// Currency codes\nexport const currencyCodes: { [key: string]: Currency } = {\n USD: {\n singular: \"dollar\",\n plural: \"dollars\",\n fraction: { singular: \"cent\", plural: \"cents\" },\n },\n EUR: {\n singular: \"euro\",\n plural: \"euros\",\n fraction: { singular: \"cent\", plural: \"cents\" },\n },\n GBP: {\n singular: \"pound\",\n plural: \"pounds\",\n fraction: { singular: \"penny\", plural: \"pence\" },\n },\n JPY: {\n singular: \"yen\",\n plural: \"yen\",\n fraction: null,\n },\n INR: {\n singular: \"rupee\",\n plural: \"rupees\",\n fraction: { singular: \"paisa\", plural: \"paise\" },\n },\n CHF: {\n singular: \"Swiss franc\",\n plural: \"Swiss francs\",\n fraction: { singular: \"rappen\", plural: \"rappen\" },\n },\n AUD: {\n singular: \"Australian dollar\",\n plural: \"Australian dollars\",\n fraction: { singular: \"cent\", plural: \"cents\" },\n },\n CAD: {\n singular: \"Canadian dollar\",\n plural: \"Canadian dollars\",\n fraction: { singular: \"cent\", plural: \"cents\" },\n },\n};\n\nexport const currencies = {\n ...currencySymbols,\n ...currencyCodes,\n};\n\nexport const math = {\n \"+\": \"plus\",\n \"-\": \"minus\",\n \"*\": \"times\",\n \"×\": \"times\",\n \"·\": \"times\",\n \"/\": \"divided by\",\n \"÷\": \"divided by\",\n \":\": \"divided by\",\n \"^\": \"to the power of\",\n};\n","import { units, math, currencyCodes, currencySymbols } from \"../../config/default\";\n\nconst sanitizeString = (str: string): string => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n};\n\n// Dynamic pattern generation from config\nconst currencySymbolsSanitized = Object.keys(currencySymbols)\n .map((key) => sanitizeString(key)) // Escape special regex characters\n .join(\"|\");\nconst currencyCodesSanitized = Object.keys(currencyCodes).join(\"|\");\n\nconst allUnits = Object.keys(units)\n .map((key) => sanitizeString(key))\n .sort((a, b) => b.length - a.length)\n .join(\"|\");\n\nconst operatorSymbols = Object.keys(math)\n .map((operator) => sanitizeString(operator))\n .join(\"|\");\n\nconst regexMatches = new RegExp(\n [\n // Currency Matching (Highest Priority)\n `(?<=^|\\\\s)(?:` + // Ensures the match is at the beginning of the string or preceded by whitespace\n `(?<symbolCurrency>(?<negativeSignSymbol>-)?(?<currencySymbol>${currencySymbolsSanitized})\\\\s*(?<symbolInt>(?:\\\\d{1,3}(?:,\\\\d{3})*|\\\\d+))(?:\\\\.(?<symbolDec>\\\\d+))?)` + // Matches currency with symbols\n `|` + // OR\n `(?<codeCurrency>(?<negativeSignCode>-)?(?<codeInt>(?:\\\\d{1,3}(?:,\\\\d{3})*|\\\\d+))(?:\\\\.(?<codeDec>\\\\d+))?[ \\\\t]*(?<currencyCode>${currencyCodesSanitized}))` + // Matches currency with codes\n `)` + // End of currency matching group\n `(?=(?:\\\\s|$|(?:\\\\.(?!\\\\d))|[^\\\\d.]))`, // Ensures the match is followed by whitespace, end of string, or non-numeric characters\n\n // Scientific Notation 5e-10, 5e10, 5.5e10, 5.5e-10\n `|(?<scientific>` + // Group for scientific notation\n `(?<negativeSignScientific>-)?(?<scientificInt>\\\\d+)(?:\\\\.(?<scientificDec>\\\\d+))?(?:[eE])(?<scientificExponent>[+-]?\\\\d+)` + // Matches scientific notation format\n `)(?=(?:\\\\s|$|(?:\\\\.(?!\\\\d))|[^\\\\d.]))`, // Ensures the match is followed by whitespace, end of string, or non-numeric characters\n\n // Numeric Units 5km, 10m/s, 10m/s^2, 10m/s², 10m²/s, 10m²/s²\n `|(?<unit>` + // Group for units\n `(?<negativeSignUnit>-)?(?<unitInt>(?:\\\\d{1,3}(?:,\\\\d{3})*|\\\\d+))(?:\\\\.(?<unitDec>\\\\d+))?` + // Matches the number part of the unit\n `\\\\s*` + // Matches optional whitespace\n `(?:` + // Group for handling exponents (caret or superscript)\n `\\\\^(?<unitCaretExponentPre>-?\\\\d+)|` + // Matches caret exponent\n `(?<unitSuperExponentPre>⁻?[¹²³⁴⁵⁶⁷⁸⁹])` + // Matches superscript exponent\n `)?` + // End of exponent group\n `\\\\s*(?<unitName>(?:${allUnits})\\\\b)` + // Matches the unit name\n `(?:` + // Group for handling exponents (caret or superscript)\n `\\\\^(?<unitCaretExponentPost>-?\\\\d+)|` + // Matches caret exponent\n `(?<unitSuperExponentPost>⁻?[¹²³⁴⁵⁶⁷⁸⁹])` + // Matches superscript exponent\n `)?` + // End of exponent group\n `)(?=(?:\\\\s|$|(?:\\\\.(?!\\\\d))|[^\\\\d.]))`, // Ensures the match is followed by whitespace, end of string, or non-numeric characters\n\n // Number with optional exponent\n `|(?<!\\\\w)(?<number>` + // Group for number\n `(?<negativeSignInteger>-)?` + // Matches an optional negative sign\n `(?<integerInt>(?:\\\\d{1,3}(?:,\\\\d{3})*|\\\\d+))` + // Matches the integer part of the number\n `(?:\\\\.(?<integerDec>\\\\d+))?` + // Matches the decimal part of the number\n `(?:(?:\\\\^(?<integerCaretExponent>-?\\\\d+))|` + // Matches exponent with caret\n `(?<integerSuperExponent>⁻?[¹²³⁴⁵⁶⁷⁸⁹]))?` + // Matches exponent with superscript\n `)(?=(?:\\\\s|$|(?:\\\\.(?!\\\\d))|[^\\\\d.]))`, // Ensures the match is followed by whitespace, end of string, or non-numeric characters\n\n // Unit Only (e.g., m, kg, m², kg³)\n `|(?<unitOnly>` + // Group for unit only\n `(?<![\\\\w.])` + // Negative lookbehind to prevent matching units within words\n `(?<unitNameOnly>(?:${allUnits})\\\\b)` + // Matches the unit name\n `(?:\\\\^(?<unitOnlyCaretExponent>-?\\\\d+)|(?<unitOnlySuperExponent>⁻?[¹²³⁴⁵⁶⁷⁸⁹]))?` + // Matches optional exponent\n `(?!\\\\w)` + // Negative lookahead to prevent matching units within words\n `)(?=(?:\\\\s|$|(?:\\\\.(?!\\\\d))|[^\\\\d.]))`, // Ensures the match is followed by whitespace, end of string, or non-numeric characters\n // Mathematical Operators\n `|(?<operator>(?:(?<=^)|(?<=\\\\s))(${operatorSymbols})(?=\\\\s|$|(?:\\\\.(?!\\\\d))))`, // Matches mathematical operators\n ].join(\"\"),\n \"u\",\n);\n\nexport { regexMatches };\n","import { regexMatches } from \"./regexPatterns\";\nimport { ExtractionResult } from \"../../interfaces/definitions\";\n\n/**\n * Returns the first match of a number, currency, unit, or exponent in the given string.\n * The returned object contains the extracted groups and additional information such as\n * the type of match and the index of the match in the string.\n *\n * @param {string} input - The string to search for matches\n * @returns {ExtractionResult | null} - The extracted groups and additional information, or null if no match is found\n */\n\nexport function extractFirstMatch(input: string): ExtractionResult | null {\n const match = input.match(regexMatches);\n\n if (match && match.groups && match.index !== undefined) {\n const matchedGroup = Object.fromEntries(Object.entries(match.groups).filter(([_, value]) => value !== undefined));\n let matchType = Object.keys(matchedGroup)[0];\n\n const extractedGroup = {} as ExtractionResult;\n\n switch (matchType) {\n case \"symbolCurrency\":\n extractedGroup.integer = matchedGroup[\"symbolInt\"];\n extractedGroup.decimal = matchedGroup[\"symbolDec\"];\n extractedGroup.negativeInt = matchedGroup[\"negativeSignSymbol\"] !== undefined;\n extractedGroup.currency = matchedGroup[\"currencySymbol\"];\n break;\n case \"codeCurrency\":\n extractedGroup.integer = matchedGroup[\"codeInt\"];\n extractedGroup.decimal = matchedGroup[\"codeDec\"];\n extractedGroup.negativeInt = matchedGroup[\"negativeSignCode\"] !== undefined;\n extractedGroup.currency = matchedGroup[\"currencyCode\"];\n break;\n case \"scientific\":\n extractedGroup.integer = matchedGroup[\"scientificInt\"];\n extractedGroup.decimal = matchedGroup[\"scientificDec\"];\n extractedGroup.negativeInt = matchedGroup[\"negativeSignScientific\"] !== undefined;\n extractedGroup.exponent = matchedGroup[\"scientificExponent\"];\n break;\n case \"unit\":\n extractedGroup.integer = matchedGroup[\"unitInt\"];\n extractedGroup.decimal = matchedGroup[\"unitDec\"];\n extractedGroup.negativeInt = matchedGroup[\"negativeSignUnit\"] !== undefined;\n extractedGroup.unit = matchedGroup[\"unitName\"];\n extractedGroup.exponent = matchedGroup[\"unitCaretExponentPre\"] || matchedGroup[\"unitSuperExponentPre\"];\n extractedGroup.unitExponent = matchedGroup[\"unitCaretExponentPost\"] || matchedGroup[\"unitSuperExponentPost\"];\n break;\n case \"unitOnly\":\n extractedGroup.unit = matchedGroup[\"unitNameOnly\"];\n extractedGroup.unitExponent = matchedGroup[\"unitOnlyCaretExponent\"] || matchedGroup[\"unitOnlySuperExponent\"];\n break;\n case \"operator\":\n break;\n case \"number\":\n extractedGroup.integer = matchedGroup[\"integerInt\"];\n extractedGroup.decimal = matchedGroup[\"integerDec\"];\n extractedGroup.exponent = matchedGroup[\"integerSuperExponent\"] || matchedGroup[\"integerCaretExponent\"];\n extractedGroup.negativeInt = matchedGroup[\"negativeSignInteger\"] !== undefined;\n break;\n default:\n break;\n }\n\n extractedGroup.matchType = matchType;\n extractedGroup.input = matchedGroup[matchType];\n extractedGroup.index = match.index;\n\n if (matchType !== \"operator\" && matchType !== \"scientific\" && matchType !== \"unitOnly\")\n extractedGroup.integer = extractedGroup.integer !== undefined ? extractedGroup.integer.replace(/,/g, \"\") : \"0\";\n\n return extractedGroup;\n }\n\n return null;\n}\n\n/**\n * Extracts all matches of a number, currency, unit, or exponent in the given string\n * and returns an array of the extracted groups and additional information such as\n * the type of match and the index of the match in the string.\n *\n * If the input string contains no matches, an empty array is returned.\n *\n * @param {string} input - The string to search for matches\n * @returns {ExtractionResult[]} - The extracted groups and additional information, or an empty array if no match is found\n */\nexport function extractAllMatches(input: string): ExtractionResult[] {\n const results: ExtractionResult[] = [];\n let remainingInput = input;\n let currentExtraction = extractFirstMatch(remainingInput);\n\n while (currentExtraction !== null && currentExtraction.input) {\n const remainingLength = input.length - remainingInput.length;\n\n if (results.length > 0) {\n currentExtraction.index = remainingInput.indexOf(currentExtraction.input) + remainingLength;\n }\n\n results.push(currentExtraction);\n\n remainingInput = remainingInput.substring(\n remainingInput.indexOf(currentExtraction.input) + currentExtraction.input.length,\n );\n\n currentExtraction = extractFirstMatch(remainingInput);\n }\n\n return results;\n}\n","import { numbers } from \"../../config/default\";\n\n/**\n * Converts a number less than 1000 into words.\n * @param num The number to convert (0-999).\n * @returns The word representation of the number.\n */\n\nexport function zeroTo999(num: number): string {\n if (num === 0) {\n return \"\";\n }\n\n let words = \"\";\n\n if (num >= 100) {\n words += numbers.ones[Math.floor(num / 100)] + \" hundred\";\n num %= 100;\n if (num > 0) {\n words += \" \";\n }\n }\n\n if (num >= 20) {\n words += numbers.tens[Math.floor(num / 10)];\n num %= 10;\n if (num > 0) {\n words += \"-\" + numbers.ones[num];\n }\n } else if (num >= 10) {\n words += numbers.teens[num - 10];\n } else if (num > 0) {\n words += numbers.ones[num];\n }\n\n return words;\n}\n","import { numbers } from \"../../config/default\";\nimport { zeroTo999 } from \"./zeroTo999\";\n\n/**\n * Converts a non-negative integer into its full English word representation.\n * @param num The integer to convert.\n * @returns The word representation of the number, or an error message for invalid input.\n */\n\nexport function positiveInteger(num: number): string {\n if (typeof num !== \"number\" || !Number.isInteger(num) || num < 0) {\n return \"Invalid input: Please provide a non-negative integer.\";\n }\n\n if (num === 0) {\n return \"zero\";\n }\n\n let words = \"\";\n let scaleIndex = 0;\n\n while (num > 0) {\n if (num % 1000 !== 0) {\n const upToHundreds = zeroTo999(num % 1000);\n const magnitudeScale = numbers.scales[scaleIndex] ? \" \" + numbers.scales[scaleIndex] : \"\";\n words = upToHundreds + magnitudeScale + (words ? \" \" + words : \"\");\n }\n num = Math.floor(num / 1000);\n scaleIndex++;\n }\n\n return words.trim().replace(/\\s+/g, \" \");\n}\n","import { positiveInteger } from \"./positiveInteger\";\n\n/**\n * Converts a given number of cents to words, provided it is a valid number between 0 and 99.\n * @param num The number of cents to convert, as a string.\n * @returns The word representation of the number of cents, or an empty string if the conversion failed.\n */\n\nexport function twoDigit(num: string): string {\n if (num.trim().length !== 2) return \"\";\n let parsed = parseInt(num);\n\n if (parsed < 100 && parsed >= 0) return positiveInteger(parsed);\n return \"\";\n}\n","export const negative = (bool: boolean): string => {\n return bool ? \"negative \" : \"\";\n};\n","import { currencies } from \"../config/default\";\nimport { Currency } from \"../interfaces/configurations/default\";\nimport { positiveInteger } from \"../utils/stringBuilding/positiveInteger\";\nimport { twoDigit } from \"../utils/stringBuilding/twoDigits\";\nimport { negative } from \"../utils/stringBuilding/negative\";\nimport { baseCurrency } from \"../interfaces/definitions\";\n\n/**\n * Converts a currency object into its spoken word representation.\n * @param {baseCurrency} amount - The currency object to convert.\n * @returns {string} The spoken word representation of the currency.\n */\nexport function convertCurrencyToSpokenWord(amount: baseCurrency): string {\n let sentence = \"\";\n const { integer, decimal, negativeInt, currency } = amount;\n\n let currencyConfig: Currency = currencies[currency];\n\n let parsedInteger = parseInt(integer);\n\n sentence += negative(negativeInt);\n sentence += positiveInteger(parsedInteger) + \" \";\n sentence += parsedInteger < 2 ? currencyConfig.singular : currencyConfig.plural + \" \";\n if (decimal !== undefined && currencyConfig.fraction !== null && currencyConfig.fraction !== undefined) {\n sentence += \"and \";\n sentence += twoDigit(decimal) + \" \";\n sentence += parseInt(decimal) < 2 ? currencyConfig.fraction.singular : currencyConfig.fraction.plural;\n }\n return sentence.trim();\n}\n","import { positiveInteger } from \"./positiveInteger\";\n\n/**\n * Converts each digit in a number to words, and returns them as a joined string.\n * @param num The number to convert, as a string.\n * @returns A string of space-separated words, where each word is a digit in the original number.\n * @example convertPerDigit(\"123\") => \"one two three\"\n */\n\nexport function perDigit(num: string): string {\n const words = [];\n for (let i = 0; i < num.length; i++) {\n words.push(positiveInteger(parseInt(num[i])));\n }\n return words.join(\" \");\n}\n","/**\n * Converts a string of superscript digits to regular integer string.\n * @param {string} superscriptString - String containing superscript digits.\n * @returns {string} - String of regular digits.\n */\nexport function toRegularInteger(superscriptString: string): string {\n const superscriptMap: { [key: string]: string } = {\n \"⁰\": \"0\",\n \"¹\": \"1\",\n \"²\": \"2\",\n \"³\": \"3\",\n \"⁴\": \"4\",\n \"⁵\": \"5\",\n \"⁶\": \"6\",\n \"⁷\": \"7\",\n \"⁸\": \"8\",\n \"⁹\": \"9\",\n };\n\n let standardDigitString = \"\";\n for (let char of superscriptString) {\n if (superscriptMap[char]) {\n standardDigitString += superscriptMap[char];\n } else {\n standardDigitString += char;\n }\n }\n\n return standardDigitString;\n}\n","import { toRegularInteger } from \"../parseSuperscript\";\nimport { positiveInteger } from \"./positiveInteger\";\n\n/** * Converts an exponent integer to its spoken word representation, * optionally using \"squared\" and \"cubed\" for exponents 2 and 3. * @param exponent The exponent value as an integer. * @param onlyUsePowerOf A boolean flag. If false, uses \"squared\" for 2 and \"cubed\" for 3. * If true, uses \"to the power of two\", \"to the power of three\", etc. * @returns The spoken word representation of the exponent. */\n\nexport function exponentSpokenWord(exponent: string, onlyUsePowerOf: boolean = false): string {\n const isNegative = exponent.startsWith(\"-\") || exponent.startsWith(\"⁻\");\n let newExponentString = toRegularInteger(isNegative ? exponent.slice(1) : exponent);\n if (!onlyUsePowerOf && !isNegative) {\n if (newExponentString === \"2\") {\n return \"squared\";\n }\n if (newExponentString === \"3\") {\n return \"cubed\";\n }\n }\n let res = \"to the power of \" + (isNegative ? \"negative \" : \"\") + positiveInteger(parseInt(newExponentString));\n return res;\n}\n","import { positiveInteger } from \"../utils/stringBuilding/positiveInteger\";\nimport { twoDigit } from \"../utils/stringBuilding/twoDigits\";\nimport { perDigit } from \"../utils/stringBuilding/perDigit\";\nimport { negative } from \"../utils/stringBuilding/negative\";\nimport { baseNumber } from \"../interfaces/definitions\";\nimport { exponentSpokenWord } from \"../utils/stringBuilding/exponent\";\n\n/**\n * Converts a number object into its spoken word representation.\n * @param {baseNumber} num - The number object to convert.\n * @returns {string} The spoken word representation of the number.\n */\nexport function convertNumberToSpokenWord(num: baseNumber): string {\n const { integer, decimal, negativeInt, exponent } = num;\n\n let sentence = negative(negativeInt);\n\n sentence += positiveInteger(parseInt(integer)) + \" \";\n\n if (decimal !== undefined) {\n sentence += \"point \";\n if (decimal.length === 1 || decimal.length > 2) {\n sentence += perDigit(decimal) + \" \";\n } else {\n sentence += twoDigit(decimal) + \" \";\n }\n }\n\n if (exponent !== undefined) {\n sentence += exponentSpokenWord(exponent, true);\n }\n return sentence.trim();\n}\n","import { units } from \"../config/default\";\nimport { baseNumberUnit } from \"../interfaces/definitions\";\nimport { Unit } from \"../interfaces/configurations/default\";\nimport { exponentSpokenWord } from \"../utils/stringBuilding/exponent\";\nimport { convertNumberToSpokenWord } from \"./convertNumberToSpokenWord\";\n\n/**\n * Converts a numeric unit object into its spoken word representation.\n * @param {baseNumberUnit} numericUnit - The numeric unit object to convert.\n * @returns {string} The spoken word representation of the numeric unit.\n */\nexport function convertNumericUnitToSpokenWord(numericUnit: baseNumberUnit): string {\n const { integer, decimal, unit, negativeInt, exponent, unitExponent } = numericUnit;\n\n let sentence = convertNumberToSpokenWord({\n integer,\n decimal,\n negativeInt,\n matchType: \"number\",\n input: \"\",\n index: 0,\n });\n\n let spokenUnit: Unit;\n\n let directUnitKey = unit + (unitExponent !== undefined ? unitExponent : \"\");\n\n let directUnit = units[directUnitKey];\n\n if (directUnit !== undefined) {\n spokenUnit = directUnit;\n } else {\n spokenUnit = units[unit];\n }\n\n if (spokenUnit === undefined) {\n return \"\";\n }\n\n let isPlural = parseFloat(integer + \".\" + decimal) > 1 && spokenUnit.plural;\n\n let spokenNumberExponent: string = \"\";\n let spokenUnitExponent: string = \"\";\n\n if (exponent !== undefined) {\n spokenNumberExponent = exponentSpokenWord(exponent, true);\n }\n\n if (unitExponent !== undefined && directUnit === undefined) {\n spokenUnitExponent = exponentSpokenWord(unitExponent);\n }\n\n sentence +=\n \" \" + spokenNumberExponent + \" \" + (isPlural ? spokenUnit.plural : spokenUnit.singular) + \" \" + spokenUnitExponent;\n\n sentence = sentence.trim().replace(/\\s+/g, \" \");\n\n return sentence;\n}\n","import { math } from \"../config/default\";\nimport { baseOperator } from \"../interfaces/definitions\";\n\n/**\n * Converts an operator object into its spoken word representation.\n * @param {baseOperator} operatorObject - The operator object to convert.\n * @returns {string} The spoken word representation of the operator.\n */\nexport function convertOperatorToSpokenWord(operatorObject: baseOperator): string {\n const { input } = operatorObject;\n if (input === undefined) {\n return \"\";\n }\n return math[input as keyof typeof math];\n}\n","import { convertNumberToSpokenWord } from \"./convertNumberToSpokenWord\";\nimport { toRegularInteger } from \"../utils/parseSuperscript\";\nimport { baseScientific } from \"../interfaces/definitions\";\n\n/**\n * Converts a scientific expression object into its spoken word representation.\n * @param {baseScientific} expression - The scientific expression object to convert.\n * @returns {string} The spoken word representation of the scientific expression.\n */\nexport function convertScientificExpressionToSpokenWord(expression: baseScientific): string {\n const { integer, decimal, exponent, negativeInt } = expression;\n\n const isNegativeExponent = exponent.startsWith(\"-\") || exponent.startsWith(\"⁻\");\n\n let E = \"times ten to the power of \";\n\n let sentence =\n convertNumberToSpokenWord({\n integer,\n decimal,\n negativeInt,\n matchType: \"number\",\n input: \"\",\n index: 0,\n }) +\n \" \" +\n E +\n convertNumberToSpokenWord({\n decimal: undefined,\n negativeInt: isNegativeExponent,\n integer: toRegularInteger(isNegativeExponent ? exponent.slice(1) : exponent),\n matchType: \"number\",\n input: \"\",\n index: 0,\n });\n\n return sentence.trim();\n}\n","import { units } from \"../config/default\";\nimport { Unit } from \"../interfaces/configurations/default\";\nimport { exponentSpokenWord } from \"../utils/stringBuilding/exponent\";\nimport { baseUnitOnly } from \"../interfaces/definitions\";\n\n/**\n * Converts a unit-only object into its spoken word representation.\n * @param {baseUnitOnly} unitOnlyObject - The unit-only object to convert.\n * @returns {string} The spoken word representation of the unit.\n */\nexport function convertUnitOnlyToSpokenWord(unitOnlyObject: baseUnitOnly): string {\n const { unit, unitExponent } = unitOnlyObject;\n\n let spokenUnit: Unit;\n\n spokenUnit = units[unit];\n\n let result: string = \"\";\n if (spokenUnit === undefined) {\n return \"\";\n }\n\n if (unitExponent !== undefined) {\n result = spokenUnit.singular + \" \" + exponentSpokenWord(unitExponent);\n } else {\n result = spokenUnit.singular;\n }\n return result;\n}\n","import { ExtractionResult } from \"../interfaces/definitions\";\n\nfunction isValidIntegerString(str: string | undefined, allowNegative: boolean = false): boolean {\n if (str === undefined) {\n return true;\n }\n let regex;\n if (allowNegative) {\n regex = /^(?:[\\u207B\\u002D]?[\\d\\u2070-\\u2079]+)$/;\n } else {\n regex = /^[\\d\\u2070-\\u2079]+$/;\n }\n return regex.test(str);\n}\n\n/**\n * Validates an ExtractionResult object.\n *\n * Checks that the object is present, contains the required properties, and that\n * the values of those properties are of the correct type.\n *\n * If the object is invalid, throws an Error with a description of the problem.\n *\n * @param {ExtractionResult} extractionResult - The object to validate.\n */\nexport function validateExtractionResult(extractionResult: ExtractionResult): void {\n if (!extractionResult) {\n throw new Error(\"validateExtractionResult: ExtractionResult cannot be null or undefined.\");\n }\n\n if (typeof extractionResult !== \"object\") {\n throw new Error(\"validateExtractionResult: ExtractionResult must be an object.\");\n }\n\n if (!(\"input\" in extractionResult)) {\n throw new Error(\"validateExtractionResult: ExtractionResult is missing the 'input' property.\");\n }\n if (typeof extractionResult.input !== \"string\") {\n throw new Error(\"validateExtractionResult: ExtractionResult 'input' property must be a string.\");\n }\n\n if (!(\"matchType\" in extractionResult)) {\n throw new Error(\"validateExtractionResult: ExtractionResult is missing the 'matchType' property.\");\n }\n if (typeof extractionResult.matchType !== \"string\") {\n throw new Error(\"validateExtractionResult: ExtractionResult 'matchType' property must be a string.\");\n }\n\n if (!(\"index\" in extractionResult)) {\n throw new Error(\"validateExtractionResult: ExtractionResult is missing the 'index' property.\");\n }\n if (typeof extractionResult.index !== \"number\") {\n throw new Error(\"validateExtractionResult: ExtractionResult 'index' property must be a number.\");\n }\n\n const { matchType } = extractionResult;\n\n switch (matchType) {\n case \"number\":\n if (!(\"integer\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult is missing the 'integer' property.\",\n );\n }\n if (typeof extractionResult.integer !== \"string\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'integer' property must be a string.\",\n );\n }\n if (!isValidIntegerString(extractionResult.integer)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'integer' property must contain only integers.\",\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n typeof extractionResult.decimal !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'decimal' property must be a string if present.\",\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n !isValidIntegerString(extractionResult.decimal)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'decimal' property must contain only integers.\",\n );\n }\n if (!(\"negativeInt\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult is missing the 'negativeInt' property.\",\n );\n }\n if (typeof extractionResult.negativeInt !== \"boolean\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'negativeInt' property must be a boolean.\",\n );\n }\n if (\n \"exponent\" in extractionResult &&\n extractionResult.exponent !== undefined &&\n typeof extractionResult.exponent !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'exponent' property must be a string if present.\",\n );\n }\n if (\n \"exponent\" in extractionResult &&\n extractionResult.exponent !== undefined &&\n !isValidIntegerString(extractionResult.exponent, true)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'number', ExtractionResult 'exponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).\",\n );\n }\n break;\n\n case \"symbolCurrency\":\n case \"codeCurrency\":\n if (!(\"integer\" in extractionResult)) {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult is missing the 'integer' property.`,\n );\n }\n if (typeof extractionResult.integer !== \"string\") {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult 'integer' property must be a string.`,\n );\n }\n if (!isValidIntegerString(extractionResult.integer)) {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult 'integer' property must contain only integers.`,\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n typeof extractionResult.decimal !== \"string\"\n ) {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult 'decimal' property must be a string if present.`,\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n !isValidIntegerString(extractionResult.decimal)\n ) {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult 'decimal' property must contain only integers.`,\n );\n }\n if (!(\"negativeInt\" in extractionResult)) {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult is missing the 'negativeInt' property.`,\n );\n }\n if (typeof extractionResult.negativeInt !== \"boolean\") {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult 'negativeInt' property must be a boolean.`,\n );\n }\n if (!(\"currency\" in extractionResult)) {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult is missing the 'currency' property.`,\n );\n }\n if (typeof extractionResult.currency !== \"string\") {\n throw new Error(\n `validateExtractionResult: For matchType '${matchType}', ExtractionResult 'currency' property must be a string.`,\n );\n }\n break;\n\n case \"unit\":\n if (!(\"integer\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult is missing the 'integer' property.\",\n );\n }\n if (typeof extractionResult.integer !== \"string\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'integer' property must be a string.\",\n );\n }\n if (!isValidIntegerString(extractionResult.integer)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'integer' property must contain only integers.\",\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n typeof extractionResult.decimal !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'decimal' property must be a string if present.\",\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n !isValidIntegerString(extractionResult.decimal)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'decimal' property must contain only integers.\",\n );\n }\n if (!(\"negativeInt\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult is missing the 'negativeInt' property.\",\n );\n }\n if (typeof extractionResult.negativeInt !== \"boolean\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'negativeInt' property must be a boolean.\",\n );\n }\n if (!(\"unit\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult is missing the 'unit' property.\",\n );\n }\n if (typeof extractionResult.unit !== \"string\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'unit' property must be a string.\",\n );\n }\n if (\n \"exponent\" in extractionResult &&\n extractionResult.exponent !== undefined &&\n typeof extractionResult.exponent !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'exponent' property must be a string if present.\",\n );\n }\n if (\n \"exponent\" in extractionResult &&\n extractionResult.exponent !== undefined &&\n !isValidIntegerString(extractionResult.exponent, true)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'exponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).\",\n );\n }\n if (\n \"unitExponent\" in extractionResult &&\n extractionResult.unitExponent !== undefined &&\n typeof extractionResult.unitExponent !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'unitExponent' property must be a string if present.\",\n );\n }\n if (\n \"unitExponent\" in extractionResult &&\n extractionResult.unitExponent !== undefined &&\n !isValidIntegerString(extractionResult.unitExponent, true)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unit', ExtractionResult 'unitExponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).\",\n );\n }\n break;\n\n case \"unitOnly\":\n if (!(\"unit\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unitOnly', ExtractionResult is missing the 'unit' property.\",\n );\n }\n if (typeof extractionResult.unit !== \"string\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'unitOnly', ExtractionResult 'unit' property must be a string.\",\n );\n }\n if (\n \"unitExponent\" in extractionResult &&\n extractionResult.unitExponent !== undefined &&\n typeof extractionResult.unitExponent !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unitOnly', ExtractionResult 'unitExponent' property must be a string if present.\",\n );\n }\n if (\n \"unitExponent\" in extractionResult &&\n extractionResult.unitExponent !== undefined &&\n !isValidIntegerString(extractionResult.unitExponent, true)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'unitOnly', ExtractionResult 'unitExponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).\",\n );\n }\n break;\n\n case \"operator\":\n break; // No specific properties to validate for operator\n\n case \"scientific\":\n if (!(\"integer\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult is missing the 'integer' property.\",\n );\n }\n if (typeof extractionResult.integer !== \"string\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'integer' property must be a string.\",\n );\n }\n if (!isValidIntegerString(extractionResult.integer)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'integer' property must contain only integers.\",\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n typeof extractionResult.decimal !== \"string\"\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'decimal' property must be a string if present.\",\n );\n }\n if (\n \"decimal\" in extractionResult &&\n extractionResult.decimal !== undefined &&\n !isValidIntegerString(extractionResult.decimal)\n ) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'decimal' property must contain only integers.\",\n );\n }\n if (!(\"negativeInt\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult is missing the 'negativeInt' property.\",\n );\n }\n if (typeof extractionResult.negativeInt !== \"boolean\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'negativeInt' property must be a boolean.\",\n );\n }\n if (!(\"exponent\" in extractionResult)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult is missing the 'exponent' property.\",\n );\n }\n if (extractionResult.exponent !== undefined && typeof extractionResult.exponent !== \"string\") {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'exponent' property must be a string.\",\n );\n }\n if (extractionResult.exponent !== undefined && !isValidIntegerString(extractionResult.exponent, true)) {\n throw new Error(\n \"validateExtractionResult: For matchType 'scientific', ExtractionResult 'exponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).\",\n );\n }\n break;\n\n default:\n throw new Error(`validateExtractionResult: Unknown matchType: ${matchType}`);\n }\n}\n","import { extractFirstMatch, extractAllMatches } from \"./utils/extraction/patternExtractor\";\nimport { convertCurrencyToSpokenWord } from \"./converters/convertCurrencyToSpokenWord\";\nimport { convertNumberToSpokenWord } from \"./converters/convertNumberToSpokenWord\";\nimport { convertNumericUnitToSpokenWord } from \"./converters/convertNumericUnitToSpokenWord\";\nimport { convertOperatorToSpokenWord } from \"./converters/convertOperatorToSpokenWord\";\nimport { convertScientificExpressionToSpokenWord } from \"./converters/convertScientificExpressionToSpokenWord\";\nimport { convertUnitOnlyToSpokenWord } from \"./converters/convertUnitOnlyToSpokenWord\";\n\nimport type {\n baseCurrency,\n baseNumber,\n baseNumberUnit,\n baseOperator,\n baseScientific,\n baseUnitOnly,\n ExtractionResult,\n} from \"./interfaces/definitions\";\n\nimport { validateExtractionResult } from \"./utils/validateExtractionResultObject\";\n\n/**\n * @namespace extractQuantities\n * @description Contains functions for extracting numeric data from a string.\n */\nconst extractQuantities = {\n /**\n * Extracts the first match (number || currency || unit || operator || scientific expression) from the input string.\n * @param {string} input - The string to extract from.\n * @returns {ExtractionResult | null} The extracted data or null if no match is found.\n */\n firstMatch: extractFirstMatch,\n /**\n * Extracts all matches (number || currency || unit || operator || scientific expression) from the input string.\n * @param {string} input - The string to extract from.\n * @returns {ExtractionResult[]} The extracted data.\n */\n allMatches: extractAllMatches,\n};\n\n/**\n * @namespace convertQuantities\n * @description Contains functions for converting (number || currency || unit || operator || scientific expression) data from a string or object to spoken word.\n */\nconst convertQuantities = {\n /**\n * Translates an ExtractionResult object (number || currency || unit || operator || scientific expression) into its spoken word equivalent.\n *\n * @param {ExtractionResult} extractionResult - The ExtractionResult object to translate.\n * @returns {string} The spoken word equivalent of the ExtractionResult.\n */\n translateMatch: (extractionResult: ExtractionResult): string => {\n let result: string = \"\";\n\n switch (extractionResult.matchType) {\n case \"number\":\n result = convertNumberToSpokenWord(extractionResult as baseNumber);\n break;\n\n case \"symbolCurrency\":\n result = convertCurrencyToSpokenWord(extractionResult as baseCurrency);\n break;\n case \"codeCurrency\":\n result = convertCurrencyToSpokenWord(extractionResult as baseCurrency);\n break;\n case \"unit\":\n result = convertNumericUnitToSpokenWord(extractionResult as baseNumberUnit);\n break;\n case \"unitOnly\":\n result = convertUnitOnlyToSpokenWord(extractionResult as baseUnitOnly);\n break;\n case \"operator\":\n result = convertOperatorToSpokenWord(extractionResult as baseOperator);\n break;\n case \"scientific\":\n result = convertScientificExpressionToSpokenWord(extractionResult as baseScientific);\n break;\n\n default:\n break;\n }\n return result;\n },\n\n /**\n * Extracts the first match (number || currency || unit || operator || scientific expression) from the input string\n * and translates it to its spoken word equivalent.\n *\n * @param {string} input - The string to extract and translate from.\n * @returns {string} The input string with the first match replaced by its spoken word equivalent,\n * or an empty string if no match is found.\n */\n autoReplaceFirstMatch: (input: string): string => {\n const match = extractFirstMatch(input);\n if (!match) return \"\";\n return input.replace(match.input, convertQuantities.translateMatch(match));\n },\n\n /**\n * Extracts all matches (number || currency || unit || operator || scientific expression) from the input string\n * and translates them to their spoken word equivalents.\n *\n * @param {string} input - The string to extract and translate from.\n * @returns {string} The input string with all matches replaced by their spoken word equivalents. Returns the original string if no matches are found.\n */\n autoReplaceAllMatches: (input: string): string => {\n const matches = extractAllMatches(input);\n\n if (matches.length === 0) {\n return input;\n }\n\n let output = \"\";\n let lastIndex = 0;\n\n for (const match of matches) {\n output += input.substring(lastIndex, match.index);\n output += convertQuantities.translateMatch(match);\n lastIndex = match.index + match.input.length;\n }\n\n output += input.substring(lastIndex);\n return output.replace(/\\s+/g, \" \").trim();\n },\n};\n\nconsole.log(convertQuantities.autoReplaceAllMatches(\"25 EUR\"));\n\nexport { convertQuantities, extractQuantities, validateExtractionResult };\nexport type { ExtractionResult, baseCurrency, baseNumber, baseNumberUnit, baseOperator, baseScientific, baseUnitOnly };\n"]}
|