Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9c5d66e

Browse files
committed
default country
1 parented145fb commit9c5d66e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎src/common/country.util.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
importcountryUtilfrom"i18n-iso-countries";
1+
import*ascountriesModulefrom"i18n-iso-countries";
22

33
// eslint-disable-next-line @typescript-eslint/no-var-requires
44
constenLocale=require("i18n-iso-countries/langs/en.json");
55

6+
// Handle environments where the module might be exposed on either the module
7+
// object itself or under a `default` export.
8+
constcountryUtil=
9+
(countriesModuleasunknownas{default?:typeofcountriesModule}).default??
10+
countriesModule;
11+
612
countryUtil.registerLocale(enLocale);
713

814
exportfunctionalpha3ToCountryName(code?:string|null):string|null{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp