Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For each region, include metadata of main country for calling code #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
489 changes: 250 additions & 239 deletions dist/libphonenumber.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_001.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_AC.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_AD.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_AE.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_AF.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_AG.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_AI.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_AL.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_AM.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_AO.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_AR.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_AS.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_AT.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_AU.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_AW.js

Large diffs are not rendered by default.

82 changes: 43 additions & 39 deletions dist/libphonenumber_AX.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_AZ.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_BA.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_BB.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_BD.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_BE.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_BF.js

Large diffs are not rendered by default.

84 changes: 43 additions & 41 deletions dist/libphonenumber_BG.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_BH.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_BI.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_BJ.js

Large diffs are not rendered by default.

81 changes: 42 additions & 39 deletions dist/libphonenumber_BL.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_BM.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_BN.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_BO.js

Large diffs are not rendered by default.

82 changes: 43 additions & 39 deletions dist/libphonenumber_BQ.js

Large diffs are not rendered by default.

84 changes: 43 additions & 41 deletions dist/libphonenumber_BR.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_BS.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_BT.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_BW.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_BY.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_BZ.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_CA.js

Large diffs are not rendered by default.

84 changes: 44 additions & 40 deletions dist/libphonenumber_CC.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CD.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CF.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CG.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CH.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CI.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CK.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CL.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CM.js

Large diffs are not rendered by default.

92 changes: 47 additions & 45 deletions dist/libphonenumber_CN.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CO.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CR.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CU.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CV.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CW.js

Large diffs are not rendered by default.

84 changes: 44 additions & 40 deletions dist/libphonenumber_CX.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CY.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_CZ.js

Large diffs are not rendered by default.

85 changes: 44 additions & 41 deletions dist/libphonenumber_DE.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_DJ.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_DK.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_DM.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_DO.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_DZ.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_EC.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_EE.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_EG.js

Large diffs are not rendered by default.

83 changes: 44 additions & 39 deletions dist/libphonenumber_EH.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_ER.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_ES.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_ET.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_FI.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_FJ.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_FK.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_FM.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_FO.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_FR.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GA.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GB.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_GD.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GE.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GF.js

Large diffs are not rendered by default.

86 changes: 46 additions & 40 deletions dist/libphonenumber_GG.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GH.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GI.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GL.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GM.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GN.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GP.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_GQ.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GR.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GT.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_GU.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GW.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_GY.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_HK.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_HN.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_HR.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_HT.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_HU.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_ID.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_IE.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_IL.js

Large diffs are not rendered by default.

86 changes: 46 additions & 40 deletions dist/libphonenumber_IM.js

Large diffs are not rendered by default.

89 changes: 46 additions & 43 deletions dist/libphonenumber_IN.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_IO.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_IQ.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_IR.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_IS.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_IT.js

Large diffs are not rendered by default.

86 changes: 46 additions & 40 deletions dist/libphonenumber_JE.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_JM.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_JO.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_JP.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_KE.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_KG.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_KH.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_KI.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_KM.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_KN.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_KP.js

Large diffs are not rendered by default.

88 changes: 46 additions & 42 deletions dist/libphonenumber_KR.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_KW.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_KY.js

Large diffs are not rendered by default.

82 changes: 43 additions & 39 deletions dist/libphonenumber_KZ.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_LA.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_LB.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_LC.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_LI.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_LK.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_LR.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_LS.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_LT.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_LU.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_LV.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_LY.js

Large diffs are not rendered by default.

83 changes: 43 additions & 40 deletions dist/libphonenumber_MA.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MC.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MD.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_ME.js

Large diffs are not rendered by default.

81 changes: 42 additions & 39 deletions dist/libphonenumber_MF.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MG.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MH.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MK.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_ML.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MM.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MN.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MO.js

Large diffs are not rendered by default.

83 changes: 44 additions & 39 deletions dist/libphonenumber_MP.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MQ.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MR.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_MS.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MT.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MU.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MV.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MW.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MX.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MY.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_MZ.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_NA.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_NC.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_NE.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_NF.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_NG.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_NI.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_NL.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_NO.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_NP.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_NR.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_NU.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_NZ.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_OM.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_PA.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_PE.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_PF.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_PG.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_PH.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_PK.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_PL.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_PM.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_PR.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_PS.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_PT.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_PW.js

Large diffs are not rendered by default.

84 changes: 43 additions & 41 deletions dist/libphonenumber_PY.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_QA.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_RE.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_RO.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_RS.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_RU.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_RW.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SA.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SB.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SC.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SD.js

Large diffs are not rendered by default.

90 changes: 46 additions & 44 deletions dist/libphonenumber_SE.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SG.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SH.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SI.js

Large diffs are not rendered by default.

83 changes: 43 additions & 40 deletions dist/libphonenumber_SJ.js

Large diffs are not rendered by default.

83 changes: 43 additions & 40 deletions dist/libphonenumber_SK.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SL.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SM.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_SN.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SO.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SR.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SS.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_ST.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SV.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_SX.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SY.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_SZ.js

Large diffs are not rendered by default.

81 changes: 42 additions & 39 deletions dist/libphonenumber_TA.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_TC.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_TD.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_TG.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_TH.js

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions dist/libphonenumber_TJ.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_TK.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_TL.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_TM.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_TN.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_TO.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_TR.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_TT.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_TV.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_TW.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_TZ.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_UA.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_UG.js

Large diffs are not rendered by default.

84 changes: 43 additions & 41 deletions dist/libphonenumber_US.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_UY.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_UZ.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_VA.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_VC.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_VE.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_VG.js

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions dist/libphonenumber_VI.js

Large diffs are not rendered by default.

84 changes: 43 additions & 41 deletions dist/libphonenumber_VN.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_VU.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_WF.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_WS.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_YE.js

Large diffs are not rendered by default.

81 changes: 42 additions & 39 deletions dist/libphonenumber_YT.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_ZA.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_ZM.js

Large diffs are not rendered by default.

80 changes: 41 additions & 39 deletions dist/libphonenumber_ZW.js

Large diffs are not rendered by default.

24 changes: 19 additions & 5 deletions metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function writeFile(regionCode, countryToMetadata, countryCodeToRegionCodeMap) {
return fs.writeFileSync(outpath + 'metadata_'+regionCode+'.js', output.join(';\n'));
}

var regionCodeToCountryCodeMap = {};
var regionCodeToCountryCodeMap = {}; // construct map from territory codes ('region code') to country calling codes ('country code')
for (var countryCode in context.i18n.phonenumbers.metadata.countryCodeToRegionCodeMap) {
context.i18n.phonenumbers.metadata.countryCodeToRegionCodeMap[countryCode].forEach(function(regionCode) {
if (!regionCodeToCountryCodeMap[regionCode]) {
Expand All @@ -32,16 +32,30 @@ for (var countryCode in context.i18n.phonenumbers.metadata.countryCodeToRegionCo
});
}

// Grab the appropriate data.
// Grab the appropriate data, which includes the metadata for:
// - the region (e.g. CC)
// - the main country for the same calling code (e.g. AU, which shares calling code 61 with CC)
//
// Note: 'countryCode' = country calling code (e.g. 61 for AU)
// 'regionCode' = ISO 3166-1 alpha-2 (e.g. AU)

var countryToMetadata, countryCodeToRegionCodeMap;
for (var regionCode in context.i18n.phonenumbers.metadata.countryToMetadata) {
if (!Number.isNaN(parseInt(regionCode))) { continue; }

countryToMetadata = {};
var countryCode = regionCodeToCountryCodeMap[regionCode],
// get main country (first in the array) for the shared country calling code and include its metadata
mainCountryForCode = context.i18n.phonenumbers.metadata.countryCodeToRegionCodeMap[countryCode][0],
regionCodesToAdd = (regionCode === mainCountryForCode) ? [regionCode] : [mainCountryForCode, regionCode];

countryCodeToRegionCodeMap = {};
countryCodeToRegionCodeMap[countryCode] = regionCodesToAdd; // populate country code to region code map

countryToMetadata[regionCode] = context.i18n.phonenumbers.metadata.countryToMetadata[regionCode];
countryCodeToRegionCodeMap[regionCodeToCountryCodeMap[regionCode]] = [regionCode];
// add metadata for each relevant region code
countryToMetadata = {};
regionCodesToAdd.forEach(function (regionCodeToAdd) {
countryToMetadata[regionCodeToAdd] = context.i18n.phonenumbers.metadata.countryToMetadata[regionCodeToAdd];
});

writeFile(regionCode, countryToMetadata, countryCodeToRegionCodeMap);
}
Expand Down