@stacrypt/world-countries-info
Version:
List of countries with useful info, and search functions
27 lines (26 loc) • 833 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var getCountry_1 = __importDefault(require("./getCountry"));
var US = {
alpha2: "US",
alpha3: "USA",
name: {
en: "United States",
fa: "ایالات متحده",
},
dialCode: "+1",
svgUrl: "/a/a4/Flag_of_the_United_States.svg",
emoji: "🇺🇸",
unicode: "U+1F1FA U+1F1F8",
numericCode: "840",
};
test("getCountry tests", function () {
var queries = ["us", "uS", "usa", "UsA", 840, "840"];
queries.forEach(function (query) {
expect(getCountry_1.default(query)).toStrictEqual(US);
});
expect(getCountry_1.default("uss")).toBe(undefined);
});