locale-service 0.0.7 → 0.0.9
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/lib/index.js +3 -3
- package/package.json +1 -1
- package/src/index.ts +6 -6
package/lib/index.js
CHANGED
|
@@ -11,7 +11,7 @@ function initLocaleResources() {
|
|
|
11
11
|
var key = keys_1[_i];
|
|
12
12
|
var x = locales_1.locales[key];
|
|
13
13
|
var l = {
|
|
14
|
-
id:
|
|
14
|
+
id: key,
|
|
15
15
|
countryCode: x.b,
|
|
16
16
|
dateFormat: (x.c !== undefined ? x.c : 'dd/MM/yyyy'),
|
|
17
17
|
firstDayOfWeek: (x.d !== undefined ? x.d : 2),
|
|
@@ -58,9 +58,9 @@ function initCurrencyResources() {
|
|
|
58
58
|
var key = keys_2[_i];
|
|
59
59
|
var x = currencies_1.currencies[key];
|
|
60
60
|
var c = {
|
|
61
|
-
|
|
61
|
+
code: key,
|
|
62
62
|
decimalDigits: (x.b !== undefined ? x.b : 2),
|
|
63
|
-
|
|
63
|
+
symbol: x.c
|
|
64
64
|
};
|
|
65
65
|
cr[key] = c;
|
|
66
66
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -24,7 +24,7 @@ interface LocaleAlias {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export interface Locale {
|
|
27
|
-
id
|
|
27
|
+
id: string;
|
|
28
28
|
countryCode: string;
|
|
29
29
|
dateFormat: string;
|
|
30
30
|
firstDayOfWeek: number;
|
|
@@ -42,7 +42,7 @@ function initLocaleResources(): void {
|
|
|
42
42
|
for (const key of keys) {
|
|
43
43
|
const x: LocaleAlias = locales[key];
|
|
44
44
|
const l: Locale = {
|
|
45
|
-
id:
|
|
45
|
+
id: key,
|
|
46
46
|
countryCode: x.b,
|
|
47
47
|
dateFormat: (x.c !== undefined ? x.c : 'dd/MM/yyyy'),
|
|
48
48
|
firstDayOfWeek: (x.d !== undefined ? x.d : 2),
|
|
@@ -94,9 +94,9 @@ interface CurrencyAlias {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export interface Currency {
|
|
97
|
-
|
|
97
|
+
code?: string;
|
|
98
98
|
decimalDigits: number;
|
|
99
|
-
|
|
99
|
+
symbol: string;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
function initCurrencyResources(): void {
|
|
@@ -104,9 +104,9 @@ function initCurrencyResources(): void {
|
|
|
104
104
|
for (const key of keys) {
|
|
105
105
|
const x: CurrencyAlias = currencies[key];
|
|
106
106
|
const c: Currency = {
|
|
107
|
-
|
|
107
|
+
code: key,
|
|
108
108
|
decimalDigits: (x.b !== undefined ? x.b : 2),
|
|
109
|
-
|
|
109
|
+
symbol: x.c
|
|
110
110
|
};
|
|
111
111
|
cr[key] = c;
|
|
112
112
|
}
|