src/phonelib.js
function getExample(countryCode, numberType, national) {
    try {
        var phoneUtil = i18n.phonenumbers.PhoneNumberUtil.getInstance();
        var numberObj = phoneUtil.getExampleNumberForType(countryCode, numberType);
        var format = (national) ? i18n.phonenumbers.PhoneNumberFormat.NATIONAL : i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL;
        return phoneUtil.format(numberObj, format);
    } catch (e) {
        return "";
    }
}
function getExample(countryCode, numberType, national) {
    try {
        var phoneUtil = i18n.phonenumbers.PhoneNumberUtil.getInstance();
        var numberObj = phoneUtil.getExampleNumberForType(countryCode, numberType);
        var format = (national) ? i18n.phonenumbers.PhoneNumberFormat.NATIONAL : i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL;
        return phoneUtil.format(numberObj, format);
    } catch (e) {
        return "";
    }
}
function getExample ( countryCode , numberType , national ) { try { var phoneUtil = i18n . phonenumbers . PhoneNumberUtil . getInstance ( ) ; var numberObj = phoneUtil . getExampleNumberForType ( countryCode , numberType ) ; var format = ( national ) ? i18n . phonenumbers . PhoneNumberFormat . NATIONAL : i18n . phonenumbers . PhoneNumberFormat . INTERNATIONAL ; return phoneUtil . format ( numberObj , format ) ; } catch ( e ) { return "" ; } }
get an example number for the given country code
get an example number for the given country code