We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed145fb commit 9c5d66eCopy full SHA for 9c5d66e
src/common/country.util.ts
@@ -1,8 +1,14 @@
1
-import countryUtil from "i18n-iso-countries";
+import * as countriesModule from "i18n-iso-countries";
2
3
// eslint-disable-next-line @typescript-eslint/no-var-requires
4
const enLocale = require("i18n-iso-countries/langs/en.json");
5
6
+// Handle environments where the module might be exposed on either the module
7
+// object itself or under a `default` export.
8
+const countryUtil =
9
+ (countriesModule as unknown as { default?: typeof countriesModule }).default ??
10
+ countriesModule;
11
+
12
countryUtil.registerLocale(enLocale);
13
14
export function alpha3ToCountryName(code?: string | null): string | null {
0 commit comments