@@ -11,7 +11,6 @@ function normalize(str: string) {
1111
1212function fixKnownVariants ( str : string ) {
1313 const map : Record < string , string > = {
14- missouri : 'missouri' ,
1514 niederosterreich : 'niederoesterreich' ,
1615 oberosterreich : 'oberoesterreich' ,
1716 karnten : 'kaernten' ,
@@ -26,18 +25,85 @@ const usSubdivisions = [
2625 'alabama' , 'alaska' , 'arizona' , 'arkansas' , 'california' , 'colorado' , 'connecticut' , 'delaware' , 'district of columbia' , 'florida' , 'georgia' , 'hawaii' , 'idaho' , 'illinois' , 'indiana' , 'iowa' , 'kansas' , 'kentucky' , 'louisiana' , 'maine' , 'maryland' , 'massachusetts' , 'michigan' , 'minnesota' , 'mississippi' , 'missouri' , 'montana' , 'nebraska' , 'nevada' , 'new hampshire' , 'new jersey' , 'new mexico' , 'new york' , 'north carolina' , 'north dakota' , 'ohio' , 'oklahoma' , 'oregon' , 'pennsylvania' , 'rhode island' , 'south carolina' , 'south dakota' , 'tennessee' , 'texas' , 'utah' , 'vermont' , 'virginia' , 'washington' , 'west virginia' , 'wisconsin' , 'wyoming' ,
2726] ;
2827
29- const irelandSubs = [ 'dublin' , 'cork' , 'kerry' , 'galway' , 'clare' , 'kildare' , 'kilkenny' , 'laois' , 'limerick' , 'longford' , 'louth' , 'mayo' , 'meath' , 'monaghan' , 'offaly' , 'roscommon' , 'sligo' , 'tipperary' , 'waterford' , 'westmeath' , 'wexford' , 'wicklow' , 'donegal' ] ;
28+ const irelandSubs = [
29+ 'carlow' ,
30+ 'clare' ,
31+ 'cork' ,
32+ 'donegal' ,
33+ 'dublin' ,
34+ 'galway' ,
35+ 'kerry' ,
36+ 'kildare' ,
37+ 'kilkenny' ,
38+ 'laois' ,
39+ 'limerick' ,
40+ 'longford' ,
41+ 'louth' ,
42+ 'mayo' ,
43+ 'meath' ,
44+ 'monaghan' ,
45+ 'offaly' ,
46+ 'roscommon' ,
47+ 'sligo' ,
48+ 'tipperary' ,
49+ 'waterford' ,
50+ 'westmeath' ,
51+ 'wexford' ,
52+ 'wicklow' ,
53+ ] ;
3054
31- const portugalSubs = [ 'aveiro' , 'beja' , 'coimbra' , 'faro' , 'leiria' , 'lisboa' , 'portalegre' , 'porto' ] ;
55+ const portugalSubs = [
56+ 'aveiro' ,
57+ 'beja' ,
58+ 'coimbra' ,
59+ 'faro' ,
60+ 'leiria' ,
61+ 'lisboa' ,
62+ 'portalegre' ,
63+ 'porto' ,
64+ ] ;
3265
33- const austriaSubs = [ 'salzburg' , 'steiermark' , 'kaernten' , 'niederoesterreich' , 'oberoesterreich' ] ;
66+ const austriaSubs = [
67+ 'kaernten' ,
68+ 'niederoesterreich' ,
69+ 'oberoesterreich' ,
70+ 'salzburg' ,
71+ 'steiermark' ,
72+ ] ;
3473
35- const swedenSubs = [ 'halland' , 'blekinge' ] ;
74+ const swedenSubs = [
75+ 'halland' ,
76+ 'blekinge' ,
77+ ] ;
3678
37- const englandSubs = [ 'east sussex' , 'west sussex' ] ;
38- const scotlandSubs = [ 'argyll' , 'bute' , 'east dunbartonshire' , 'west dunbartonshire' ] ;
79+ const englandSubs = [
80+ 'east sussex' ,
81+ 'west sussex' ,
82+ ] ;
83+ const scotlandSubs = [
84+ 'argyll' ,
85+ 'bute' ,
86+ 'east dunbartonshire' ,
87+ 'west dunbartonshire' ,
88+ ] ;
3989
40- const koreaSubs = [ 'seoul' , 'incheon' , 'daejeon' , 'daegu' , 'busan' , 'gwangju' , 'jeollabukdo' , 'jeollanamdo' , 'jeju' , 'jejudo' , 'gyeonggido' , 'chungcheongbukdo' , 'chungcheongnamdo' , 'gyeongsangbukdo' , 'gyeongsangnamdo' , 'gangwondo' ] ;
90+ const southKoreaSubs = [
91+ 'busan' ,
92+ 'chungcheongbukdo' ,
93+ 'chungcheongnamdo' ,
94+ 'daejeon' ,
95+ 'deagu' ,
96+ 'gangwondo' ,
97+ 'gwangju' ,
98+ 'gyeonggido' ,
99+ 'gyeongsangbukdo' ,
100+ 'gyeongsangnamdo' ,
101+ 'incheon' ,
102+ 'jejudo' ,
103+ 'jeollabukdo' ,
104+ 'jeollanamdo' ,
105+ 'seoul' ,
106+ ] ;
41107
42108const germanySubs = [ 'berlin' ] ;
43109const italySubs = [ 'bolzano' ] ;
@@ -54,7 +120,7 @@ for (const name of austriaSubs) lookup.set(name, countryId('austria'));
54120for ( const name of swedenSubs ) lookup . set ( name , countryId ( 'sweden' ) ) ;
55121for ( const name of englandSubs ) lookup . set ( name , countryId ( 'england' ) ) ;
56122for ( const name of scotlandSubs ) lookup . set ( name , countryId ( 'scotland' ) ) ;
57- for ( const name of koreaSubs ) lookup . set ( name , countryId ( 'south_korea' ) ) ;
123+ for ( const name of southKoreaSubs ) lookup . set ( name , countryId ( 'south_korea' ) ) ;
58124for ( const name of germanySubs ) lookup . set ( name , countryId ( 'germany' ) ) ;
59125for ( const name of italySubs ) lookup . set ( name , countryId ( 'italy' ) ) ;
60126for ( const name of japanSubs ) lookup . set ( name , countryId ( 'japan' ) ) ;
0 commit comments