quantible 0.1.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +97 -0
  2. package/dist/cjs/config/default.js +395 -0
  3. package/dist/cjs/config/default.js.map +1 -0
  4. package/dist/cjs/converters/convertCurrencyToSpokenWord.js +28 -0
  5. package/dist/cjs/converters/convertCurrencyToSpokenWord.js.map +1 -0
  6. package/dist/cjs/converters/convertNumberToSpokenWord.js +32 -0
  7. package/dist/cjs/converters/convertNumberToSpokenWord.js.map +1 -0
  8. package/dist/cjs/converters/convertNumericUnitToSpokenWord.js +48 -0
  9. package/dist/cjs/converters/convertNumericUnitToSpokenWord.js.map +1 -0
  10. package/dist/cjs/converters/convertOperatorToSpokenWord.js +17 -0
  11. package/dist/cjs/converters/convertOperatorToSpokenWord.js.map +1 -0
  12. package/dist/cjs/converters/convertScientificExpressionToSpokenWord.js +35 -0
  13. package/dist/cjs/converters/convertScientificExpressionToSpokenWord.js.map +1 -0
  14. package/dist/cjs/converters/convertUnitOnlyToSpokenWord.js +27 -0
  15. package/dist/cjs/converters/convertUnitOnlyToSpokenWord.js.map +1 -0
  16. package/dist/cjs/index.js +116 -0
  17. package/dist/cjs/index.js.map +1 -0
  18. package/dist/cjs/interfaces/configurations/default.js +3 -0
  19. package/dist/cjs/interfaces/configurations/default.js.map +1 -0
  20. package/dist/cjs/interfaces/definitions.js +3 -0
  21. package/dist/cjs/interfaces/definitions.js.map +1 -0
  22. package/dist/cjs/utils/extraction/patternExtractor.js +96 -0
  23. package/dist/cjs/utils/extraction/patternExtractor.js.map +1 -0
  24. package/dist/cjs/utils/extraction/regexPatterns.js +65 -0
  25. package/dist/cjs/utils/extraction/regexPatterns.js.map +1 -0
  26. package/dist/cjs/utils/parseSuperscript.js +33 -0
  27. package/dist/cjs/utils/parseSuperscript.js.map +1 -0
  28. package/dist/cjs/utils/stringBuilding/exponent.js +21 -0
  29. package/dist/cjs/utils/stringBuilding/exponent.js.map +1 -0
  30. package/dist/cjs/utils/stringBuilding/negative.js +8 -0
  31. package/dist/cjs/utils/stringBuilding/negative.js.map +1 -0
  32. package/dist/cjs/utils/stringBuilding/perDigit.js +18 -0
  33. package/dist/cjs/utils/stringBuilding/perDigit.js.map +1 -0
  34. package/dist/cjs/utils/stringBuilding/positiveInteger.js +31 -0
  35. package/dist/cjs/utils/stringBuilding/positiveInteger.js.map +1 -0
  36. package/dist/cjs/utils/stringBuilding/twoDigits.js +18 -0
  37. package/dist/cjs/utils/stringBuilding/twoDigits.js.map +1 -0
  38. package/dist/cjs/utils/stringBuilding/zeroTo999.js +37 -0
  39. package/dist/cjs/utils/stringBuilding/zeroTo999.js.map +1 -0
  40. package/dist/cjs/utils/validateExtractionResultObject.js +206 -0
  41. package/dist/cjs/utils/validateExtractionResultObject.js.map +1 -0
  42. package/dist/esm/config/default.js +392 -0
  43. package/dist/esm/config/default.js.map +1 -0
  44. package/dist/esm/converters/convertCurrencyToSpokenWord.js +25 -0
  45. package/dist/esm/converters/convertCurrencyToSpokenWord.js.map +1 -0
  46. package/dist/esm/converters/convertNumberToSpokenWord.js +29 -0
  47. package/dist/esm/converters/convertNumberToSpokenWord.js.map +1 -0
  48. package/dist/esm/converters/convertNumericUnitToSpokenWord.js +45 -0
  49. package/dist/esm/converters/convertNumericUnitToSpokenWord.js.map +1 -0
  50. package/dist/esm/converters/convertOperatorToSpokenWord.js +14 -0
  51. package/dist/esm/converters/convertOperatorToSpokenWord.js.map +1 -0
  52. package/dist/esm/converters/convertScientificExpressionToSpokenWord.js +32 -0
  53. package/dist/esm/converters/convertScientificExpressionToSpokenWord.js.map +1 -0
  54. package/dist/esm/converters/convertUnitOnlyToSpokenWord.js +24 -0
  55. package/dist/esm/converters/convertUnitOnlyToSpokenWord.js.map +1 -0
  56. package/dist/esm/index.js +111 -0
  57. package/dist/esm/index.js.map +1 -0
  58. package/dist/esm/interfaces/configurations/default.js +2 -0
  59. package/dist/esm/interfaces/configurations/default.js.map +1 -0
  60. package/dist/esm/interfaces/definitions.js +2 -0
  61. package/dist/esm/interfaces/definitions.js.map +1 -0
  62. package/dist/esm/utils/extraction/patternExtractor.js +92 -0
  63. package/dist/esm/utils/extraction/patternExtractor.js.map +1 -0
  64. package/dist/esm/utils/extraction/regexPatterns.js +62 -0
  65. package/dist/esm/utils/extraction/regexPatterns.js.map +1 -0
  66. package/dist/esm/utils/parseSuperscript.js +30 -0
  67. package/dist/esm/utils/parseSuperscript.js.map +1 -0
  68. package/dist/esm/utils/stringBuilding/exponent.js +18 -0
  69. package/dist/esm/utils/stringBuilding/exponent.js.map +1 -0
  70. package/dist/esm/utils/stringBuilding/negative.js +4 -0
  71. package/dist/esm/utils/stringBuilding/negative.js.map +1 -0
  72. package/dist/esm/utils/stringBuilding/perDigit.js +15 -0
  73. package/dist/esm/utils/stringBuilding/perDigit.js.map +1 -0
  74. package/dist/esm/utils/stringBuilding/positiveInteger.js +28 -0
  75. package/dist/esm/utils/stringBuilding/positiveInteger.js.map +1 -0
  76. package/dist/esm/utils/stringBuilding/twoDigits.js +15 -0
  77. package/dist/esm/utils/stringBuilding/twoDigits.js.map +1 -0
  78. package/dist/esm/utils/stringBuilding/zeroTo999.js +34 -0
  79. package/dist/esm/utils/stringBuilding/zeroTo999.js.map +1 -0
  80. package/dist/esm/utils/validateExtractionResultObject.js +203 -0
  81. package/dist/esm/utils/validateExtractionResultObject.js.map +1 -0
  82. package/dist/types/config/default.d.ts +39 -0
  83. package/dist/types/converters/convertCurrencyToSpokenWord.d.ts +7 -0
  84. package/dist/types/converters/convertNumberToSpokenWord.d.ts +7 -0
  85. package/dist/types/converters/convertNumericUnitToSpokenWord.d.ts +7 -0
  86. package/dist/types/converters/convertOperatorToSpokenWord.d.ts +7 -0
  87. package/dist/types/converters/convertScientificExpressionToSpokenWord.d.ts +7 -0
  88. package/dist/types/converters/convertUnitOnlyToSpokenWord.d.ts +7 -0
  89. package/dist/types/index.d.ts +58 -0
  90. package/dist/types/interfaces/configurations/default.d.ts +22 -0
  91. package/dist/types/interfaces/definitions.d.ts +100 -0
  92. package/dist/types/utils/extraction/patternExtractor.d.ts +21 -0
  93. package/dist/types/utils/extraction/regexPatterns.d.ts +2 -0
  94. package/dist/types/utils/parseSuperscript.d.ts +6 -0
  95. package/dist/types/utils/stringBuilding/exponent.d.ts +2 -0
  96. package/dist/types/utils/stringBuilding/negative.d.ts +1 -0
  97. package/dist/types/utils/stringBuilding/perDigit.d.ts +7 -0
  98. package/dist/types/utils/stringBuilding/positiveInteger.d.ts +6 -0
  99. package/dist/types/utils/stringBuilding/twoDigits.d.ts +6 -0
  100. package/dist/types/utils/stringBuilding/zeroTo999.d.ts +6 -0
  101. package/dist/types/utils/validateExtractionResultObject.d.ts +12 -0
  102. package/package.json +61 -0
@@ -0,0 +1,206 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateExtractionResult = validateExtractionResult;
4
+ function isValidIntegerString(str, allowNegative = false) {
5
+ if (str === undefined) {
6
+ return true;
7
+ }
8
+ let regex;
9
+ if (allowNegative) {
10
+ regex = /^(?:[\u207B\u002D]?[\d\u2070-\u2079]+)$/;
11
+ }
12
+ else {
13
+ regex = /^[\d\u2070-\u2079]+$/;
14
+ }
15
+ return regex.test(str);
16
+ }
17
+ /**
18
+ * Validates an ExtractionResult object.
19
+ *
20
+ * Checks that the object is present, contains the required properties, and that
21
+ * the values of those properties are of the correct type.
22
+ *
23
+ * If the object is invalid, throws an Error with a description of the problem.
24
+ *
25
+ * @param {ExtractionResult} extractionResult - The object to validate.
26
+ */
27
+ function validateExtractionResult(extractionResult) {
28
+ if (!extractionResult) {
29
+ throw new Error("validateExtractionResult: ExtractionResult cannot be null or undefined.");
30
+ }
31
+ if (typeof extractionResult !== "object") {
32
+ throw new Error("validateExtractionResult: ExtractionResult must be an object.");
33
+ }
34
+ if (!("input" in extractionResult)) {
35
+ throw new Error("validateExtractionResult: ExtractionResult is missing the 'input' property.");
36
+ }
37
+ if (typeof extractionResult.input !== "string") {
38
+ throw new Error("validateExtractionResult: ExtractionResult 'input' property must be a string.");
39
+ }
40
+ if (!("matchType" in extractionResult)) {
41
+ throw new Error("validateExtractionResult: ExtractionResult is missing the 'matchType' property.");
42
+ }
43
+ if (typeof extractionResult.matchType !== "string") {
44
+ throw new Error("validateExtractionResult: ExtractionResult 'matchType' property must be a string.");
45
+ }
46
+ if (!("index" in extractionResult)) {
47
+ throw new Error("validateExtractionResult: ExtractionResult is missing the 'index' property.");
48
+ }
49
+ if (typeof extractionResult.index !== "number") {
50
+ throw new Error("validateExtractionResult: ExtractionResult 'index' property must be a number.");
51
+ }
52
+ const { matchType } = extractionResult;
53
+ switch (matchType) {
54
+ case "number":
55
+ if (!("integer" in extractionResult)) {
56
+ throw new Error("validateExtractionResult: For matchType 'number', ExtractionResult is missing the 'integer' property.");
57
+ }
58
+ if (typeof extractionResult.integer !== "string") {
59
+ throw new Error("validateExtractionResult: For matchType 'number', ExtractionResult 'integer' property must be a string.");
60
+ }
61
+ if (!isValidIntegerString(extractionResult.integer)) {
62
+ throw new Error("validateExtractionResult: For matchType 'number', ExtractionResult 'integer' property must contain only integers.");
63
+ }
64
+ if ("decimal" in extractionResult && extractionResult.decimal !== undefined && typeof extractionResult.decimal !== "string") {
65
+ throw new Error("validateExtractionResult: For matchType 'number', ExtractionResult 'decimal' property must be a string if present.");
66
+ }
67
+ if ("decimal" in extractionResult && extractionResult.decimal !== undefined && !isValidIntegerString(extractionResult.decimal)) {
68
+ throw new Error("validateExtractionResult: For matchType 'number', ExtractionResult 'decimal' property must contain only integers.");
69
+ }
70
+ if (!("negativeInt" in extractionResult)) {
71
+ throw new Error("validateExtractionResult: For matchType 'number', ExtractionResult is missing the 'negativeInt' property.");
72
+ }
73
+ if (typeof extractionResult.negativeInt !== "boolean") {
74
+ throw new Error("validateExtractionResult: For matchType 'number', ExtractionResult 'negativeInt' property must be a boolean.");
75
+ }
76
+ if ("exponent" in extractionResult && extractionResult.exponent !== undefined && typeof extractionResult.exponent !== "string") {
77
+ throw new Error("validateExtractionResult: For matchType 'number', ExtractionResult 'exponent' property must be a string if present.");
78
+ }
79
+ if ("exponent" in extractionResult && extractionResult.exponent !== undefined && !isValidIntegerString(extractionResult.exponent, true)) {
80
+ throw new Error("validateExtractionResult: For matchType 'number', ExtractionResult 'exponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).");
81
+ }
82
+ break;
83
+ case "symbolCurrency":
84
+ case "codeCurrency":
85
+ if (!("integer" in extractionResult)) {
86
+ throw new Error(`validateExtractionResult: For matchType '${matchType}', ExtractionResult is missing the 'integer' property.`);
87
+ }
88
+ if (typeof extractionResult.integer !== "string") {
89
+ throw new Error(`validateExtractionResult: For matchType '${matchType}', ExtractionResult 'integer' property must be a string.`);
90
+ }
91
+ if (!isValidIntegerString(extractionResult.integer)) {
92
+ throw new Error(`validateExtractionResult: For matchType '${matchType}', ExtractionResult 'integer' property must contain only integers.`);
93
+ }
94
+ if ("decimal" in extractionResult && extractionResult.decimal !== undefined && typeof extractionResult.decimal !== "string") {
95
+ throw new Error(`validateExtractionResult: For matchType '${matchType}', ExtractionResult 'decimal' property must be a string if present.`);
96
+ }
97
+ if ("decimal" in extractionResult && extractionResult.decimal !== undefined && !isValidIntegerString(extractionResult.decimal)) {
98
+ throw new Error(`validateExtractionResult: For matchType '${matchType}', ExtractionResult 'decimal' property must contain only integers.`);
99
+ }
100
+ if (!("negativeInt" in extractionResult)) {
101
+ throw new Error(`validateExtractionResult: For matchType '${matchType}', ExtractionResult is missing the 'negativeInt' property.`);
102
+ }
103
+ if (typeof extractionResult.negativeInt !== "boolean") {
104
+ throw new Error(`validateExtractionResult: For matchType '${matchType}', ExtractionResult 'negativeInt' property must be a boolean.`);
105
+ }
106
+ if (!("currency" in extractionResult)) {
107
+ throw new Error(`validateExtractionResult: For matchType '${matchType}', ExtractionResult is missing the 'currency' property.`);
108
+ }
109
+ if (typeof extractionResult.currency !== "string") {
110
+ throw new Error(`validateExtractionResult: For matchType '${matchType}', ExtractionResult 'currency' property must be a string.`);
111
+ }
112
+ break;
113
+ case "unit":
114
+ if (!("integer" in extractionResult)) {
115
+ throw new Error("validateExtractionResult: For matchType 'unit', ExtractionResult is missing the 'integer' property.");
116
+ }
117
+ if (typeof extractionResult.integer !== "string") {
118
+ throw new Error("validateExtractionResult: For matchType 'unit', ExtractionResult 'integer' property must be a string.");
119
+ }
120
+ if (!isValidIntegerString(extractionResult.integer)) {
121
+ throw new Error("validateExtractionResult: For matchType 'unit', ExtractionResult 'integer' property must contain only integers.");
122
+ }
123
+ if ("decimal" in extractionResult && extractionResult.decimal !== undefined && typeof extractionResult.decimal !== "string") {
124
+ throw new Error("validateExtractionResult: For matchType 'unit', ExtractionResult 'decimal' property must be a string if present.");
125
+ }
126
+ if ("decimal" in extractionResult && extractionResult.decimal !== undefined && !isValidIntegerString(extractionResult.decimal)) {
127
+ throw new Error("validateExtractionResult: For matchType 'unit', ExtractionResult 'decimal' property must contain only integers.");
128
+ }
129
+ if (!("negativeInt" in extractionResult)) {
130
+ throw new Error("validateExtractionResult: For matchType 'unit', ExtractionResult is missing the 'negativeInt' property.");
131
+ }
132
+ if (typeof extractionResult.negativeInt !== "boolean") {
133
+ throw new Error("validateExtractionResult: For matchType 'unit', ExtractionResult 'negativeInt' property must be a boolean.");
134
+ }
135
+ if (!("unit" in extractionResult)) {
136
+ throw new Error("validateExtractionResult: For matchType 'unit', ExtractionResult is missing the 'unit' property.");
137
+ }
138
+ if (typeof extractionResult.unit !== "string") {
139
+ throw new Error("validateExtractionResult: For matchType 'unit', ExtractionResult 'unit' property must be a string.");
140
+ }
141
+ if ("exponent" in extractionResult && extractionResult.exponent !== undefined && typeof extractionResult.exponent !== "string") {
142
+ throw new Error("validateExtractionResult: For matchType 'unit', ExtractionResult 'exponent' property must be a string if present.");
143
+ }
144
+ if ("exponent" in extractionResult && extractionResult.exponent !== undefined && !isValidIntegerString(extractionResult.exponent, true)) {
145
+ throw new Error("validateExtractionResult: For matchType 'unit', ExtractionResult 'exponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).");
146
+ }
147
+ if ("unitExponent" in extractionResult && extractionResult.unitExponent !== undefined && typeof extractionResult.unitExponent !== "string") {
148
+ throw new Error("validateExtractionResult: For matchType 'unit', ExtractionResult 'unitExponent' property must be a string if present.");
149
+ }
150
+ if ("unitExponent" in extractionResult && extractionResult.unitExponent !== undefined && !isValidIntegerString(extractionResult.unitExponent, true)) {
151
+ throw new Error("validateExtractionResult: For matchType 'unit', ExtractionResult 'unitExponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).");
152
+ }
153
+ break;
154
+ case "unitOnly":
155
+ if (!("unit" in extractionResult)) {
156
+ throw new Error("validateExtractionResult: For matchType 'unitOnly', ExtractionResult is missing the 'unit' property.");
157
+ }
158
+ if (typeof extractionResult.unit !== "string") {
159
+ throw new Error("validateExtractionResult: For matchType 'unitOnly', ExtractionResult 'unit' property must be a string.");
160
+ }
161
+ if ("unitExponent" in extractionResult && extractionResult.unitExponent !== undefined && typeof extractionResult.unitExponent !== "string") {
162
+ throw new Error("validateExtractionResult: For matchType 'unitOnly', ExtractionResult 'unitExponent' property must be a string if present.");
163
+ }
164
+ if ("unitExponent" in extractionResult && extractionResult.unitExponent !== undefined && !isValidIntegerString(extractionResult.unitExponent, true)) {
165
+ throw new Error("validateExtractionResult: For matchType 'unitOnly', ExtractionResult 'unitExponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).");
166
+ }
167
+ break;
168
+ case "operator":
169
+ break; // No specific properties to validate for operator
170
+ case "scientific":
171
+ if (!("integer" in extractionResult)) {
172
+ throw new Error("validateExtractionResult: For matchType 'scientific', ExtractionResult is missing the 'integer' property.");
173
+ }
174
+ if (typeof extractionResult.integer !== "string") {
175
+ throw new Error("validateExtractionResult: For matchType 'scientific', ExtractionResult 'integer' property must be a string.");
176
+ }
177
+ if (!isValidIntegerString(extractionResult.integer)) {
178
+ throw new Error("validateExtractionResult: For matchType 'scientific', ExtractionResult 'integer' property must contain only integers.");
179
+ }
180
+ if ("decimal" in extractionResult && extractionResult.decimal !== undefined && typeof extractionResult.decimal !== "string") {
181
+ throw new Error("validateExtractionResult: For matchType 'scientific', ExtractionResult 'decimal' property must be a string if present.");
182
+ }
183
+ if ("decimal" in extractionResult && extractionResult.decimal !== undefined && !isValidIntegerString(extractionResult.decimal)) {
184
+ throw new Error("validateExtractionResult: For matchType 'scientific', ExtractionResult 'decimal' property must contain only integers.");
185
+ }
186
+ if (!("negativeInt" in extractionResult)) {
187
+ throw new Error("validateExtractionResult: For matchType 'scientific', ExtractionResult is missing the 'negativeInt' property.");
188
+ }
189
+ if (typeof extractionResult.negativeInt !== "boolean") {
190
+ throw new Error("validateExtractionResult: For matchType 'scientific', ExtractionResult 'negativeInt' property must be a boolean.");
191
+ }
192
+ if (!("exponent" in extractionResult)) {
193
+ throw new Error("validateExtractionResult: For matchType 'scientific', ExtractionResult is missing the 'exponent' property.");
194
+ }
195
+ if (extractionResult.exponent !== undefined && typeof extractionResult.exponent !== "string") {
196
+ throw new Error("validateExtractionResult: For matchType 'scientific', ExtractionResult 'exponent' property must be a string.");
197
+ }
198
+ if (extractionResult.exponent !== undefined && !isValidIntegerString(extractionResult.exponent, true)) {
199
+ throw new Error("validateExtractionResult: For matchType 'scientific', ExtractionResult 'exponent' property must contain only integers or superscript integers (and their respective negative symbol - and ⁻).");
200
+ }
201
+ break;
202
+ default:
203
+ throw new Error(`validateExtractionResult: Unknown matchType: ${matchType}`);
204
+ }
205
+ }
206
+ //# sourceMappingURL=validateExtractionResultObject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateExtractionResultObject.js","sourceRoot":"","sources":["../../../src/utils/validateExtractionResultObject.ts"],"names":[],"mappings":";;AAyBA,4DA8LC;AArND,SAAS,oBAAoB,CAAC,GAAuB,EAAE,gBAAyB,KAAK;IACnF,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,OA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,KAAK,CAAC,+LAA+L,CAAC,CAAC;YACnN,CAAC;YACD,MAAM;QAER;YACE,MAAM,IAAI,KAAK,CAAC,gDAAgD,SAAS,EAAE,CAAC,CAAC;IACjF,CAAC;AACH,CAAC"}
@@ -0,0 +1,392 @@
1
+ export const units = {
2
+ // Base units
3
+ m: { singular: "meter", plural: "meters" },
4
+ "%": { singular: "percent", plural: "percent" },
5
+ cm: { singular: "centimeter", plural: "centimeters" },
6
+ mm: { singular: "millimeter", plural: "millimeters" },
7
+ km: { singular: "kilometer", plural: "kilometers" },
8
+ in: { singular: "inch", plural: "inches" },
9
+ ft: { singular: "foot", plural: "feet" },
10
+ yd: { singular: "yard", plural: "yards" },
11
+ mi: { singular: "mile", plural: "miles" },
12
+ g: { singular: "gram", plural: "grams" },
13
+ mg: { singular: "milligram", plural: "milligrams" },
14
+ kg: { singular: "kilogram", plural: "kilograms" },
15
+ L: { singular: "liter", plural: "liters" },
16
+ mL: { singular: "milliliter", plural: "milliliters" },
17
+ s: { singular: "second", plural: "seconds" },
18
+ min: { singular: "minute", plural: "minutes" },
19
+ h: { singular: "hour", plural: "hours" },
20
+ // Additional Time Units
21
+ d: { singular: "day", plural: "days" },
22
+ wk: { singular: "week", plural: "weeks" },
23
+ mo: { singular: "month", plural: "months" },
24
+ yr: { singular: "year", plural: "years" },
25
+ // Additional Length Units
26
+ μm: { singular: "micrometer", plural: "micrometers" },
27
+ nm: { singular: "nanometer", plural: "nanometers" },
28
+ nmi: { singular: "nautical mile", plural: "nautical miles" },
29
+ // Additional Mass Units
30
+ μg: { singular: "microgram", plural: "micrograms" },
31
+ t: { singular: "tonne", plural: "tonnes" },
32
+ lb: { singular: "pound", plural: "pounds" },
33
+ oz: { singular: "ounce", plural: "ounces" },
34
+ st: { singular: "stone", plural: "stones" },
35
+ // Volume Units
36
+ "cm³": { singular: "cubic centimeter", plural: "cubic centimeters" },
37
+ gal: { singular: "gallon", plural: "gallons" },
38
+ pt: { singular: "pint", plural: "pints" },
39
+ qt: { singular: "quart", plural: "quarts" },
40
+ "fl oz": { singular: "fluid ounce", plural: "fluid ounces" },
41
+ "ft³": { singular: "cubic foot", plural: "cubic feet" },
42
+ "in³": { singular: "cubic inch", plural: "cubic inches" },
43
+ bbl: { singular: "barrel", plural: "barrels" },
44
+ // Area Units
45
+ "m²": { singular: "square meter", plural: "square meters" },
46
+ "km²": { singular: "square kilometer", plural: "square kilometers" },
47
+ "cm²": { singular: "square centimeter", plural: "square centimeters" },
48
+ "mm²": { singular: "square millimeter", plural: "square millimeters" },
49
+ ha: { singular: "hectare", plural: "hectares" },
50
+ "ft²": { singular: "square foot", plural: "square feet" },
51
+ "in²": { singular: "square inch", plural: "square inches" },
52
+ ac: { singular: "acre", plural: "acres" },
53
+ // Angle Units
54
+ rad: { singular: "radian", plural: "radians" },
55
+ deg: { singular: "degree", plural: "degrees" },
56
+ grad: { singular: "gradian", plural: "gradians" },
57
+ // Temperature Units
58
+ K: { singular: "kelvin", plural: "kelvins" },
59
+ "°C": { singular: "degree Celsius", plural: "degrees Celsius" },
60
+ "°F": { singular: "degree Fahrenheit", plural: "degrees Fahrenheit" },
61
+ // Speed Units
62
+ "m/s": { singular: "meter per second", plural: "meters per second" },
63
+ "m/s²": {
64
+ singular: "meter per second squared",
65
+ plural: "meters per second squared",
66
+ },
67
+ "km/h": { singular: "kilometer per hour", plural: "kilometers per hour" },
68
+ "km/L": { singular: "kilometer per liter", plural: "kilometers per liter" },
69
+ mph: { singular: "mile per hour", plural: "miles per hour" },
70
+ "ft/s": { singular: "foot per second", plural: "feet per second" },
71
+ kn: { singular: "knot", plural: "knots" },
72
+ mach: { singular: "mach", plural: "" },
73
+ c: { singular: "speed of light", plural: "" },
74
+ // Force Units
75
+ N: { singular: "newton", plural: "newtons" },
76
+ kgf: { singular: "kilogram-force", plural: "" },
77
+ lbf: { singular: "pound-force", plural: "" },
78
+ dyn: { singular: "dyne", plural: "dynes" },
79
+ // Pressure Units
80
+ Pa: { singular: "pascal", plural: "pascals" },
81
+ kPa: { singular: "kilopascal", plural: "kilopascals" },
82
+ MPa: { singular: "megapascal", plural: "megapascals" },
83
+ bar: { singular: "bar", plural: "bars" },
84
+ atm: { singular: "atmosphere", plural: "atmospheres" },
85
+ mmHg: { singular: "millimeter of mercury", plural: "millimeters of mercury" },
86
+ inHg: { singular: "inch of mercury", plural: "inches of mercury" },
87
+ psi: { singular: "pound per square inch", plural: "pounds per square inch" },
88
+ "N/m²": {
89
+ singular: "newton per square meter",
90
+ plural: "newtons per square meter",
91
+ },
92
+ "kg/m²": {
93
+ singular: "kilogram per square meter",
94
+ plural: "kilograms per square meter",
95
+ },
96
+ // Energy Units
97
+ J: { singular: "joule", plural: "joules" },
98
+ kJ: { singular: "kilojoule", plural: "kilojoules" },
99
+ MJ: { singular: "megajoule", plural: "megajoules" },
100
+ cal: { singular: "calorie", plural: "calories" },
101
+ kcal: { singular: "kilocalorie", plural: "kilocalories" },
102
+ eV: { singular: "electron volt", plural: "electron volts" },
103
+ BTU: { singular: "British thermal unit", plural: "British thermal units" },
104
+ kWh: { singular: "kilowatt hour", plural: "kilowatt hours" },
105
+ // Power Units
106
+ W: { singular: "watt", plural: "watts" },
107
+ kW: { singular: "kilowatt", plural: "kilowatts" },
108
+ MW: { singular: "megawatt", plural: "megawatts" },
109
+ hp: { singular: "horsepower", plural: "" },
110
+ // Frequency Units
111
+ Hz: { singular: "hertz", plural: "" },
112
+ kHz: { singular: "kilohertz", plural: "" },
113
+ MHz: { singular: "megahertz", plural: "" },
114
+ GHz: { singular: "gigahertz", plural: "" },
115
+ rpm: { singular: "revolution per minute", plural: "revolutions per minute" },
116
+ "rad/s": { singular: "radian per second", plural: "radians per second" },
117
+ "deg/s": { singular: "degree per second", plural: "degrees per second" },
118
+ // Electrical Units
119
+ V: { singular: "volt", plural: "volts" },
120
+ mV: { singular: "millivolt", plural: "millivolts" },
121
+ μV: { singular: "microvolt", plural: "microvolts" },
122
+ kV: { singular: "kilovolt", plural: "kilovolts" },
123
+ A: { singular: "ampere", plural: "amperes" },
124
+ mA: { singular: "milliampere", plural: "milliamperes" },
125
+ μA: { singular: "microampere", plural: "microamperes" },
126
+ Ω: { singular: "ohm", plural: "ohms" },
127
+ kΩ: { singular: "kilohm", plural: "kilohms" },
128
+ MΩ: { singular: "megohm", plural: "megohms" },
129
+ F: { singular: "farad", plural: "farads" },
130
+ μF: { singular: "microfarad", plural: "microfarads" },
131
+ nF: { singular: "nanofarad", plural: "nanofarads" },
132
+ pF: { singular: "picofarad", plural: "picofarads" },
133
+ H: { singular: "henry", plural: "henries" },
134
+ mH: { singular: "millihenry", plural: "millihenries" },
135
+ μH: { singular: "microhenry", plural: "microhenries" },
136
+ S: { singular: "siemens", plural: "" },
137
+ "S/m": { singular: "siemens per meter", plural: "" },
138
+ "F/m": { singular: "farad per meter", plural: "farads per meter" },
139
+ "Ω·m": { singular: "ohm meter", plural: "ohm meters" },
140
+ "V/m": { singular: "volt per meter", plural: "volts per meter" },
141
+ "A/m": { singular: "ampere per meter", plural: "amperes per meter" },
142
+ // Magnetic Units
143
+ T: { singular: "tesla", plural: "teslas" },
144
+ mT: { singular: "millitesla", plural: "milliteslas" },
145
+ μT: { singular: "microtesla", plural: "microteslas" },
146
+ G: { singular: "gauss", plural: "" },
147
+ Wb: { singular: "weber", plural: "webers" },
148
+ mWb: { singular: "milliweber", plural: "milliwebers" },
149
+ μWb: { singular: "microweber", plural: "microwebers" },
150
+ // Density Units
151
+ "kg/m³": {
152
+ singular: "kilogram per cubic meter",
153
+ plural: "kilograms per cubic meter",
154
+ },
155
+ "g/cm³": {
156
+ singular: "gram per cubic centimeter",
157
+ plural: "grams per cubic centimeter",
158
+ },
159
+ "g/mL": { singular: "gram per milliliter", plural: "grams per milliliter" },
160
+ "lb/ft³": {
161
+ singular: "pound per cubic foot",
162
+ plural: "pounds per cubic foot",
163
+ },
164
+ "lb/in³": {
165
+ singular: "pound per cubic inch",
166
+ plural: "pounds per cubic inch",
167
+ },
168
+ sg: { singular: "specific gravity", plural: "" },
169
+ // Volumetric Flow Units
170
+ "m³/s": {
171
+ singular: "cubic meter per second",
172
+ plural: "cubic meters per second",
173
+ },
174
+ "L/s": { singular: "liter per second", plural: "liters per second" },
175
+ "L/min": { singular: "liter per minute", plural: "liters per minute" },
176
+ "L/h": { singular: "liter per hour", plural: "liters per hour" },
177
+ "gal/min": { singular: "gallon per minute", plural: "gallons per minute" },
178
+ "ft³/s": {
179
+ singular: "cubic foot per second",
180
+ plural: "cubic feet per second",
181
+ },
182
+ "bbl/d": { singular: "barrel per day", plural: "barrels per day" },
183
+ // Fuel Economy Units
184
+ "L/100km": { singular: "liter per 100 kilometers", plural: "" },
185
+ mpg: { singular: "mile per gallon", plural: "miles per gallon" },
186
+ mpg_imp: {
187
+ singular: "mile per gallon imperial",
188
+ plural: "miles per gallon imperial",
189
+ },
190
+ "L/km": { singular: "liter per kilometer", plural: "liters per kilometer" },
191
+ "L/m": { singular: "liter per meter", plural: "liters per meter" },
192
+ // Concentration Units
193
+ ppm: { singular: "part per million", plural: "parts per million" },
194
+ ppb: { singular: "part per billion", plural: "parts per billion" },
195
+ ppt: { singular: "part per trillion", plural: "parts per trillion" },
196
+ "mol/L": { singular: "mole per liter", plural: "moles per liter" },
197
+ "mol/m³": {
198
+ singular: "mole per cubic meter",
199
+ plural: "moles per cubic meter",
200
+ },
201
+ "mg/L": { singular: "milligram per liter", plural: "milligrams per liter" },
202
+ "g/L": { singular: "gram per liter", plural: "grams per liter" },
203
+ "mg/kg": {
204
+ singular: "milligram per kilogram",
205
+ plural: "milligrams per kilogram",
206
+ },
207
+ // Illumination Units
208
+ lm: { singular: "lumen", plural: "lumens" },
209
+ cd: { singular: "candela", plural: "candelas" },
210
+ lx: { singular: "lux", plural: "" },
211
+ "ft-cd": { singular: "foot-candle", plural: "foot-candles" },
212
+ // Radiation Units
213
+ Bq: { singular: "becquerel", plural: "becquerels" },
214
+ Ci: { singular: "curie", plural: "curies" },
215
+ Sv: { singular: "sievert", plural: "sieverts" },
216
+ Gy: { singular: "gray", plural: "grays" },
217
+ // Catalytic Activity Units
218
+ kat: { singular: "katal", plural: "katals" },
219
+ U: { singular: "enzyme unit", plural: "enzyme units" },
220
+ // Viscosity and Fluid Properties Units
221
+ "Pa·s": { singular: "pascal second", plural: "pascal seconds" },
222
+ cP: { singular: "centipoise", plural: "" },
223
+ "kg/(m·s)": {
224
+ singular: "kilogram per meter second",
225
+ plural: "kilograms per meter second",
226
+ },
227
+ "lb/(ft·s)": {
228
+ singular: "pound per foot second",
229
+ plural: "pounds per foot second",
230
+ },
231
+ "m²/s": {
232
+ singular: "square meter per second",
233
+ plural: "square meters per second",
234
+ },
235
+ St: { singular: "stokes", plural: "" },
236
+ cSt: { singular: "centistokes", plural: "" },
237
+ "N/m": { singular: "newton per meter", plural: "newtons per meter" },
238
+ "dyn/cm": { singular: "dyne per centimeter", plural: "dynes per centimeter" },
239
+ // Thermal Properties Units
240
+ "W/(m·K)": {
241
+ singular: "watt per meter kelvin",
242
+ plural: "watts per meter kelvin",
243
+ },
244
+ "cal/(cm·s·°C)": {
245
+ singular: "calorie per centimeter second degree Celsius",
246
+ plural: "calories per centimeter second degree Celsius",
247
+ },
248
+ "J/(kg·K)": {
249
+ singular: "joule per kilogram kelvin",
250
+ plural: "joules per kilogram kelvin",
251
+ },
252
+ "cal/(g·°C)": {
253
+ singular: "calorie per gram degree Celsius",
254
+ plural: "calories per gram degree Celsius",
255
+ },
256
+ "1/K": { singular: "per kelvin", plural: "" },
257
+ "1/°C": { singular: "per degree Celsius", plural: "" },
258
+ "W/m²": {
259
+ singular: "watt per square meter",
260
+ plural: "watts per square meter",
261
+ },
262
+ "cal/(cm²·s)": {
263
+ singular: "calorie per square centimeter second",
264
+ plural: "calories per square centimeter second",
265
+ },
266
+ "W/(m²·K)": {
267
+ singular: "watt per square meter kelvin",
268
+ plural: "watts per square meter kelvin",
269
+ },
270
+ "cal/(cm²·s·°C)": {
271
+ singular: "calorie per square centimeter second degree Celsius",
272
+ plural: "calories per square centimeter second degree Celsius",
273
+ },
274
+ "K/W": { singular: "kelvin per watt", plural: "kelvins per watt" },
275
+ "°C/W": {
276
+ singular: "degree Celsius per watt",
277
+ plural: "degrees Celsius per watt",
278
+ },
279
+ // Data Transfer and Storage Units
280
+ b: { singular: "bit", plural: "bits" },
281
+ B: { singular: "byte", plural: "bytes" },
282
+ kb: { singular: "kilobit", plural: "kilobits" },
283
+ kB: { singular: "kilobyte", plural: "kilobytes" },
284
+ Mb: { singular: "megabit", plural: "megabits" },
285
+ MB: { singular: "megabyte", plural: "megabytes" },
286
+ Gb: { singular: "gigabit", plural: "gigabits" },
287
+ GB: { singular: "gigabyte", plural: "gigabytes" },
288
+ Tb: { singular: "terabit", plural: "terabits" },
289
+ TB: { singular: "terabyte", plural: "terabytes" },
290
+ bps: { singular: "bit per second", plural: "bits per second" },
291
+ kbps: { singular: "kilobit per second", plural: "kilobits per second" },
292
+ Mbps: { singular: "megabit per second", plural: "megabits per second" },
293
+ Gbps: { singular: "gigabit per second", plural: "gigabits per second" },
294
+ };
295
+ export const numbers = {
296
+ ones: ["", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"],
297
+ teens: ["ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"],
298
+ tens: ["", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"],
299
+ scales: ["", "thousand", "million", "billion", "trillion", "quadrillion", "quintillion"],
300
+ ordinals: {
301
+ one: "first",
302
+ two: "second",
303
+ three: "third",
304
+ five: "fifth",
305
+ eight: "eighth",
306
+ nine: "ninth",
307
+ twelve: "twelfth",
308
+ },
309
+ };
310
+ export const currencySymbols = {
311
+ $: {
312
+ singular: "dollar",
313
+ plural: "dollars",
314
+ fraction: { singular: "cent", plural: "cents" },
315
+ },
316
+ "€": {
317
+ singular: "euro",
318
+ plural: "euros",
319
+ fraction: { singular: "cent", plural: "cents" },
320
+ },
321
+ "£": {
322
+ singular: "pound",
323
+ plural: "pounds",
324
+ fraction: { singular: "penny", plural: "pence" },
325
+ },
326
+ "¥": {
327
+ singular: "yen",
328
+ plural: "yen",
329
+ fraction: null,
330
+ },
331
+ "₹": {
332
+ singular: "rupee",
333
+ plural: "rupees",
334
+ fraction: { singular: "paisa", plural: "paise" },
335
+ },
336
+ };
337
+ // Currency codes
338
+ export const currencyCodes = {
339
+ USD: {
340
+ singular: "dollar",
341
+ plural: "dollars",
342
+ fraction: { singular: "cent", plural: "cents" },
343
+ },
344
+ EUR: {
345
+ singular: "euro",
346
+ plural: "euros",
347
+ fraction: { singular: "cent", plural: "cents" },
348
+ },
349
+ GBP: {
350
+ singular: "pound",
351
+ plural: "pounds",
352
+ fraction: { singular: "penny", plural: "pence" },
353
+ },
354
+ JPY: {
355
+ singular: "yen",
356
+ plural: "yen",
357
+ fraction: null,
358
+ },
359
+ INR: {
360
+ singular: "rupee",
361
+ plural: "rupees",
362
+ fraction: { singular: "paisa", plural: "paise" },
363
+ },
364
+ CHF: {
365
+ singular: "Swiss franc",
366
+ plural: "Swiss francs",
367
+ fraction: { singular: "rappen", plural: "rappen" },
368
+ },
369
+ AUD: {
370
+ singular: "Australian dollar",
371
+ plural: "Australian dollars",
372
+ fraction: { singular: "cent", plural: "cents" },
373
+ },
374
+ CAD: {
375
+ singular: "Canadian dollar",
376
+ plural: "Canadian dollars",
377
+ fraction: { singular: "cent", plural: "cents" },
378
+ },
379
+ };
380
+ export const currencies = Object.assign(Object.assign({}, currencySymbols), currencyCodes);
381
+ export const math = {
382
+ "+": "plus",
383
+ "-": "minus",
384
+ "*": "times",
385
+ "×": "times",
386
+ "·": "times",
387
+ "/": "divided by",
388
+ "÷": "divided by",
389
+ ":": "divided by",
390
+ "^": "to the power of",
391
+ };
392
+ //# sourceMappingURL=default.js.map