The country
property represents the country that was used to create the Phone
instance.
In cases where the country was not recognized and could not be guessed from the phone number, 'XX'
is used.
The e164
property represents the phone number as a string in the E.164 format.
The international
property represents the phone number as a string in the international format for the parsed country.
The mobile
property represents whether the phone number is possibly a mobile phone number or not.
This property is true
if the phone number type is either 'MOBILE'
or 'FIXED_LINE_OR_MOBILE'
.
This covers cases like in the United States and Canada where it is not possible to tell if a phone number is a mobile phone number or not based on the phone number alone.
The national
property represents the phone number as a string in the national format for the parsed country.
The phone
property represents the raw phone number string that was used to create the Phone
instance.
The raw
property represents the phone number as a string stripped of all non-numeric characters.
The timezone
property represents the estimated timezone of the phone number based on the phone number's country. It can be either a CountryTimezone
or 'UTC'
.
In cases where the phone number's country has several timezones, the timezone with the greatest population is used.
In cases where the phone number's country is not recognized or has no timezone defined, 'UTC'
is used.
The type
property represents the type of the phone number. It can be any of the keys of the PhoneNumberType
object in the google-libphonenumber
library, or 'INVALID'
if the phone number is not valid.
The valid
property represents whether the phone number uses a valid format for the parsed country or not.
The
PhoneModelInstanceObject
interface represents the properties of aPhone
instance.