@esmate/utils 1.0.4 → 1.0.5

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.
Files changed (2) hide show
  1. package/dist/locale.js +2 -4
  2. package/package.json +1 -1
package/dist/locale.js CHANGED
@@ -30,9 +30,8 @@ function getLanguageList(locale = "en-US") {
30
30
  ], {
31
31
  type: "language"
32
32
  }).of(code);
33
- if (void 0 === name) throw new Error(`Language name not found for code: ${code}`);
34
33
  return {
35
- name,
34
+ name: name || "",
36
35
  value: code
37
36
  };
38
37
  }).filter((lang)=>lang.name).sort((a, b)=>a.name.localeCompare(b.name));
@@ -48,9 +47,8 @@ function getCountryList(locale = "en-US") {
48
47
  ], {
49
48
  type: "region"
50
49
  }).of(code);
51
- if (void 0 === name) throw new Error(`Country name not found for code: ${code}`);
52
50
  return {
53
- name,
51
+ name: name || "",
54
52
  value: code
55
53
  };
56
54
  }).filter((country)=>country.name).sort((a, b)=>a.name.localeCompare(b.name));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@esmate/utils",
3
3
  "type": "module",
4
- "version": "1.0.4",
4
+ "version": "1.0.5",
5
5
  "description": "JavaScript/TypeScript utils, functions, and classes in one package.",
6
6
  "license": "MIT",
7
7
  "repository": {