@armi-wave/common 1.10.0 → 1.11.0

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.
@@ -1,5 +1,5 @@
1
1
  export default class CountryUtils {
2
- static isValidCode(code: string): Promise<boolean>;
3
- static isValidDialCode(dialCode: string): Promise<boolean>;
4
- static getNameFromCode(code: string): Promise<string | false>;
2
+ static isValidCode(code: string): boolean;
3
+ static isValidDialCode(dialCode: string): boolean;
4
+ static getNameFromCode(code: string): string | false;
5
5
  }
@@ -1,45 +1,30 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  const countries_1 = require("./countries");
13
4
  class CountryUtils {
14
5
  static isValidCode(code) {
15
- return __awaiter(this, void 0, void 0, function* () {
16
- for (const country of countries_1.countries) {
17
- if (country.code == code) {
18
- return true;
19
- }
6
+ for (const country of countries_1.countries) {
7
+ if (country.code == code) {
8
+ return true;
20
9
  }
21
- return false;
22
- });
10
+ }
11
+ return false;
23
12
  }
24
13
  static isValidDialCode(dialCode) {
25
- return __awaiter(this, void 0, void 0, function* () {
26
- for (const country of countries_1.countries) {
27
- if (country.dialCode == dialCode) {
28
- return true;
29
- }
14
+ for (const country of countries_1.countries) {
15
+ if (country.dialCode == dialCode) {
16
+ return true;
30
17
  }
31
- return false;
32
- });
18
+ }
19
+ return false;
33
20
  }
34
21
  static getNameFromCode(code) {
35
- return __awaiter(this, void 0, void 0, function* () {
36
- for (const country of countries_1.countries) {
37
- if (country.code == code) {
38
- return country.name;
39
- }
22
+ for (const country of countries_1.countries) {
23
+ if (country.code == code) {
24
+ return country.name;
40
25
  }
41
- return false;
42
- });
26
+ }
27
+ return false;
43
28
  }
44
29
  }
45
30
  exports.default = CountryUtils;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armi-wave/common",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",