@fas-core/shared-types 1.0.150 → 1.0.151
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3530,7 +3530,7 @@ var TAX_RATE_SOURCE_VALUES = Object.values(TaxRateSourceEnum);
|
|
|
3530
3530
|
|
|
3531
3531
|
// src/taxRate/label.ts
|
|
3532
3532
|
var taxRatePercent = (rate) => `${(Number(rate ?? 0) * 100).toFixed(3).replace(/\.?0+$/, "")}%`;
|
|
3533
|
-
var titleCase = (value) => value.toLowerCase().replace(/\b[a-z]/g, (letter) => letter.toUpperCase());
|
|
3533
|
+
var titleCase = (value) => value.replace(/_+/g, " ").trim().toLowerCase().replace(/\b[a-z]/g, (letter) => letter.toUpperCase());
|
|
3534
3534
|
var taxLabel = (tax) => {
|
|
3535
3535
|
if (!tax || typeof tax.rate !== "number" || tax.rate <= 0) return null;
|
|
3536
3536
|
const place = [tax.county ? `${titleCase(tax.county)} County` : null, tax.state].filter(Boolean).join(", ") || tax.groupName || "";
|