@lucaapp/service-utils 1.57.7 → 1.58.0
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.
|
@@ -25,10 +25,6 @@ export declare class Money<T extends SupportedCurrencies = SupportedCurrencies>
|
|
|
25
25
|
clone(): Money<T>;
|
|
26
26
|
getAmount(): number;
|
|
27
27
|
getAmountInMajorUnits(): number;
|
|
28
|
-
/**
|
|
29
|
-
* @deprecated Use getFormattedString in place of getEuroString
|
|
30
|
-
*/
|
|
31
|
-
getEuroString(): string;
|
|
32
28
|
getFormattedString(locale: string, includeSymbol?: boolean): string;
|
|
33
29
|
private assertSameCurrency;
|
|
34
30
|
add(addend?: Money<T>): Money<T>;
|
package/dist/lib/money/money.js
CHANGED
|
@@ -39,12 +39,6 @@ class Money {
|
|
|
39
39
|
getAmountInMajorUnits() {
|
|
40
40
|
return convertToMajorUnits(this.value);
|
|
41
41
|
}
|
|
42
|
-
/**
|
|
43
|
-
* @deprecated Use getFormattedString in place of getEuroString
|
|
44
|
-
*/
|
|
45
|
-
getEuroString() {
|
|
46
|
-
return this.getAmountInMajorUnits().toFixed(2);
|
|
47
|
-
}
|
|
48
42
|
getFormattedString(locale, includeSymbol = true) {
|
|
49
43
|
const transactionalLanguage = locale === 'de' ? 'de-DE' : 'en-US';
|
|
50
44
|
const formattedString = new Intl.NumberFormat(transactionalLanguage, {
|
|
@@ -3,8 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.currencySymbols = exports.SupportedCurrencies = void 0;
|
|
4
4
|
var SupportedCurrencies;
|
|
5
5
|
(function (SupportedCurrencies) {
|
|
6
|
+
SupportedCurrencies["CHF"] = "CHF";
|
|
6
7
|
SupportedCurrencies["EUR"] = "EUR";
|
|
8
|
+
SupportedCurrencies["GBP"] = "GBP";
|
|
7
9
|
})(SupportedCurrencies || (exports.SupportedCurrencies = SupportedCurrencies = {}));
|
|
8
10
|
exports.currencySymbols = {
|
|
11
|
+
[SupportedCurrencies.CHF]: 'CHF',
|
|
9
12
|
[SupportedCurrencies.EUR]: '€',
|
|
13
|
+
[SupportedCurrencies.GBP]: '£',
|
|
10
14
|
};
|