@riocrypto/common 1.0.665 → 1.0.666
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCountryNameFromCode: (code: string) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCountryNameFromCode = void 0;
|
|
4
|
+
const country_1 = require("../types/country");
|
|
5
|
+
const getCountryNameFromCode = (code) => {
|
|
6
|
+
const country = Object.keys(country_1.Country).find((key) => country_1.Country[key] === code);
|
|
7
|
+
return country || "Unknown";
|
|
8
|
+
};
|
|
9
|
+
exports.getCountryNameFromCode = getCountryNameFromCode;
|
package/build/index.d.ts
CHANGED
|
@@ -137,5 +137,6 @@ export * from "./helpers/get-user-from-client-helper";
|
|
|
137
137
|
export * from "./helpers/validate-address";
|
|
138
138
|
export * from "./helpers/round-down-to-two-decimal-places";
|
|
139
139
|
export * from "./helpers/humanize-order-status";
|
|
140
|
+
export * from "./helpers/get-country-name-from-code";
|
|
140
141
|
export * from "./clients/rio-client";
|
|
141
142
|
export * from "./clients/rio-admin-client";
|
package/build/index.js
CHANGED
|
@@ -153,5 +153,6 @@ __exportStar(require("./helpers/get-user-from-client-helper"), exports);
|
|
|
153
153
|
__exportStar(require("./helpers/validate-address"), exports);
|
|
154
154
|
__exportStar(require("./helpers/round-down-to-two-decimal-places"), exports);
|
|
155
155
|
__exportStar(require("./helpers/humanize-order-status"), exports);
|
|
156
|
+
__exportStar(require("./helpers/get-country-name-from-code"), exports);
|
|
156
157
|
__exportStar(require("./clients/rio-client"), exports);
|
|
157
158
|
__exportStar(require("./clients/rio-admin-client"), exports);
|