Closed simplenotezy closed 5 years ago
If I try to parse a UK number like so:
parsePhoneNumberFromString('+4412345678')
It is unable to provide me with a country key:
country
PhoneNumber {countryCallingCode: "44", nationalNumber: "12345678", number: "+4412345678", metadata: {…}} countryCallingCode: "44" metadata: {version: "1.7.24", country_calling_codes: {…}, countries: {…}} nationalNumber: "12345678" number: "+4412345678" __proto__: Object
However, it works just fine with: parsePhoneNumberFromString('+4512345678')
parsePhoneNumberFromString('+4512345678')
See output:
PhoneNumber {countryCallingCode: "45", nationalNumber: "12345678", number: "+4512345678", metadata: {…}, country: "DK"} country: "DK" countryCallingCode: "45" metadata: {version: "1.7.24", country_calling_codes: {…}, countries: {…}} nationalNumber: "12345678" number: "+4512345678" __proto__: Object
See the "bug reporting" section of the readme. Reopen if the issue persists after following the procedure.
If I try to parse a UK number like so:
parsePhoneNumberFromString('+4412345678')
It is unable to provide me with a
country
key:However, it works just fine with:
parsePhoneNumberFromString('+4512345678')
See output: