locale-service 0.2.0 → 0.2.2
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 +9 -13
- package/package.json +1 -1
- package/src/index.ts +10 -13
package/lib/index.js
CHANGED
|
@@ -78,18 +78,14 @@ function getCurrency(currencyCode) {
|
|
|
78
78
|
return c;
|
|
79
79
|
}
|
|
80
80
|
exports.getCurrency = getCurrency;
|
|
81
|
-
exports.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
currencyCode: "USD",
|
|
90
|
-
currencySymbol: "$",
|
|
91
|
-
currencyPattern: 0,
|
|
92
|
-
};
|
|
81
|
+
exports.vi = { "id": "vi-VN", "countryCode": "VN", "dateFormat": "dd/MM/yyyy", "firstDayOfWeek": 2, "decimalSeparator": ",", "groupSeparator": ".", "decimalDigits": 0, "currencyCode": "VND", "currencySymbol": "₫", "currencyPattern": 3 };
|
|
82
|
+
exports.us = { "id": "en-US", "countryCode": "US", "dateFormat": "M/d/yyyy", "firstDayOfWeek": 1, "decimalSeparator": ".", "groupSeparator": ",", "decimalDigits": 2, "currencyCode": "USD", "currencySymbol": "$", "currencyPattern": 0 };
|
|
83
|
+
exports.th = { "id": "th-TH", "countryCode": "TH", "dateFormat": "d/M/yyyy", "firstDayOfWeek": 2, "decimalSeparator": ".", "groupSeparator": ",", "decimalDigits": 2, "currencyCode": "THB", "currencySymbol": "฿", "currencyPattern": 0 };
|
|
84
|
+
exports.id = { "id": "id-ID", "countryCode": "ID", "dateFormat": "dd/MM/yyyy", "firstDayOfWeek": 2, "decimalSeparator": ",", "groupSeparator": ".", "decimalDigits": 0, "currencyCode": "IDR", "currencySymbol": "Rp", "currencyPattern": 0 };
|
|
85
|
+
exports.viLocale = exports.vi;
|
|
86
|
+
exports.usLocale = exports.us;
|
|
87
|
+
exports.thLocale = exports.th;
|
|
88
|
+
exports.idLocale = exports.id;
|
|
93
89
|
exports.usd = {
|
|
94
90
|
code: "USD",
|
|
95
91
|
symbol: "$",
|
|
@@ -98,7 +94,7 @@ exports.usd = {
|
|
|
98
94
|
var resources = (function () {
|
|
99
95
|
function resources() {
|
|
100
96
|
}
|
|
101
|
-
resources.defaultLocale = exports.
|
|
97
|
+
resources.defaultLocale = exports.us;
|
|
102
98
|
resources.defaultCurrency = exports.usd;
|
|
103
99
|
return resources;
|
|
104
100
|
}());
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -125,18 +125,15 @@ export function getCurrency(currencyCode: string): Currency|undefined {
|
|
|
125
125
|
return c;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
export const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
currencySymbol: "$",
|
|
138
|
-
currencyPattern: 0,
|
|
139
|
-
}
|
|
128
|
+
export const vi = {"id":"vi-VN","countryCode":"VN","dateFormat":"dd/MM/yyyy","firstDayOfWeek":2,"decimalSeparator":",","groupSeparator":".","decimalDigits":0,"currencyCode":"VND","currencySymbol":"₫","currencyPattern":3}
|
|
129
|
+
export const us = {"id":"en-US","countryCode":"US","dateFormat":"M/d/yyyy","firstDayOfWeek":1,"decimalSeparator":".","groupSeparator":",","decimalDigits":2,"currencyCode":"USD","currencySymbol":"$","currencyPattern":0}
|
|
130
|
+
export const th = {"id":"th-TH","countryCode":"TH","dateFormat":"d/M/yyyy","firstDayOfWeek":2,"decimalSeparator":".","groupSeparator":",","decimalDigits":2,"currencyCode":"THB","currencySymbol":"฿","currencyPattern":0}
|
|
131
|
+
export const id = {"id":"id-ID","countryCode":"ID","dateFormat":"dd/MM/yyyy","firstDayOfWeek":2,"decimalSeparator":",","groupSeparator":".","decimalDigits":0,"currencyCode":"IDR","currencySymbol":"Rp","currencyPattern":0}
|
|
132
|
+
|
|
133
|
+
export const viLocale = vi
|
|
134
|
+
export const usLocale = us
|
|
135
|
+
export const thLocale = th
|
|
136
|
+
export const idLocale = id
|
|
140
137
|
|
|
141
138
|
export const usd: Currency = {
|
|
142
139
|
code: "USD",
|
|
@@ -146,7 +143,7 @@ export const usd: Currency = {
|
|
|
146
143
|
|
|
147
144
|
// tslint:disable-next-line:class-name
|
|
148
145
|
export class resources {
|
|
149
|
-
static defaultLocale =
|
|
146
|
+
static defaultLocale = us
|
|
150
147
|
static defaultCurrency = usd
|
|
151
148
|
}
|
|
152
149
|
|