locale-service 0.2.0 → 0.2.1
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 +5 -13
- package/package.json +1 -1
- package/src/index.ts +5 -13
package/lib/index.js
CHANGED
|
@@ -78,18 +78,10 @@ function getCurrency(currencyCode) {
|
|
|
78
78
|
return c;
|
|
79
79
|
}
|
|
80
80
|
exports.getCurrency = getCurrency;
|
|
81
|
-
exports.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
firstDayOfWeek: 1,
|
|
86
|
-
decimalSeparator: ".",
|
|
87
|
-
groupSeparator: ",",
|
|
88
|
-
decimalDigits: 2,
|
|
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 };
|
|
93
85
|
exports.usd = {
|
|
94
86
|
code: "USD",
|
|
95
87
|
symbol: "$",
|
|
@@ -98,7 +90,7 @@ exports.usd = {
|
|
|
98
90
|
var resources = (function () {
|
|
99
91
|
function resources() {
|
|
100
92
|
}
|
|
101
|
-
resources.defaultLocale = exports.
|
|
93
|
+
resources.defaultLocale = exports.us;
|
|
102
94
|
resources.defaultCurrency = exports.usd;
|
|
103
95
|
return resources;
|
|
104
96
|
}());
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -125,18 +125,10 @@ export function getCurrency(currencyCode: string): Currency|undefined {
|
|
|
125
125
|
return c;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
export const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
firstDayOfWeek: 1,
|
|
133
|
-
decimalSeparator: ".",
|
|
134
|
-
groupSeparator: ",",
|
|
135
|
-
decimalDigits: 2,
|
|
136
|
-
currencyCode: "USD",
|
|
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}
|
|
140
132
|
|
|
141
133
|
export const usd: Currency = {
|
|
142
134
|
code: "USD",
|
|
@@ -146,7 +138,7 @@ export const usd: Currency = {
|
|
|
146
138
|
|
|
147
139
|
// tslint:disable-next-line:class-name
|
|
148
140
|
export class resources {
|
|
149
|
-
static defaultLocale =
|
|
141
|
+
static defaultLocale = us
|
|
150
142
|
static defaultCurrency = usd
|
|
151
143
|
}
|
|
152
144
|
|