otomato-sdk 2.0.485 → 2.0.486
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.
|
@@ -748,7 +748,12 @@ export function formatDisplayPrice(price) {
|
|
|
748
748
|
if (rounded !== absPrice && getMagnitudeTier(rounded) !== getMagnitudeTier(absPrice)) {
|
|
749
749
|
result = formatByMagnitude(rounded);
|
|
750
750
|
}
|
|
751
|
-
return sign + stripTrailingZeros(result);
|
|
751
|
+
return sign + addThousandsSeparators(stripTrailingZeros(result));
|
|
752
|
+
}
|
|
753
|
+
function addThousandsSeparators(value) {
|
|
754
|
+
const [intPart, decPart] = value.split('.');
|
|
755
|
+
const withCommas = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
756
|
+
return decPart !== undefined ? `${withCommas}.${decPart}` : withCommas;
|
|
752
757
|
}
|
|
753
758
|
function stripTrailingZeros(value) {
|
|
754
759
|
if (!value.includes('.'))
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.486";
|
|
2
2
|
export declare function compareVersions(v1: string, v2: string): number;
|