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 CHANGED
@@ -78,18 +78,14 @@ function getCurrency(currencyCode) {
78
78
  return c;
79
79
  }
80
80
  exports.getCurrency = getCurrency;
81
- exports.enLocale = {
82
- id: "en-US",
83
- countryCode: "US",
84
- dateFormat: "M/d/yyyy",
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 };
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.enLocale;
97
+ resources.defaultLocale = exports.us;
102
98
  resources.defaultCurrency = exports.usd;
103
99
  return resources;
104
100
  }());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "locale-service",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Locale Service",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./src/index.ts",
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 enLocale: Locale = {
129
- id: "en-US",
130
- countryCode: "US",
131
- dateFormat: "M/d/yyyy",
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}
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 = enLocale
146
+ static defaultLocale = us
150
147
  static defaultCurrency = usd
151
148
  }
152
149