dist/upptalk.js
function ParseInternationalNumber(number) {
    var ret;

    // Parse and strip the country code.
    var countryCode = ParseCountryCode(number);
    if (!countryCode)
      return null;
    number = number.substr(countryCode.length);

    // Lookup the meta data for the region (or regions) and if the rest of
    // the number parses for that region, return the parsed number.
    var entry = dataBase[countryCode];
    if (Array.isArray(entry)) {
      for (var n = 0; n < entry.length; ++n) {
        if (typeof entry[n] == "string")
          entry[n] = ParseMetaData(countryCode, entry[n]);
        if (n > 0)
          entry[n].formats = entry[0].formats;
        ret = ParseNationalNumber(number, entry[n])
        if (ret)
          return ret;
      }
      return null;
    }
    if (typeof entry == "string")
      entry = dataBase[countryCode] = ParseMetaData(countryCode, entry);
    return ParseNationalNumber(number, entry);
  }
function ParseInternationalNumber(number) {
    var ret;

    // Parse and strip the country code.
    var countryCode = ParseCountryCode(number);
    if (!countryCode)
      return null;
    number = number.substr(countryCode.length);

    // Lookup the meta data for the region (or regions) and if the rest of
    // the number parses for that region, return the parsed number.
    var entry = dataBase[countryCode];
    if (Array.isArray(entry)) {
      for (var n = 0; n < entry.length; ++n) {
        if (typeof entry[n] == "string")
          entry[n] = ParseMetaData(countryCode, entry[n]);
        if (n > 0)
          entry[n].formats = entry[0].formats;
        ret = ParseNationalNumber(number, entry[n])
        if (ret)
          return ret;
      }
      return null;
    }
    if (typeof entry == "string")
      entry = dataBase[countryCode] = ParseMetaData(countryCode, entry);
    return ParseNationalNumber(number, entry);
  }
function ParseInternationalNumber ( number ) { var ret ; // Parse and strip the country code. var countryCode = ParseCountryCode ( number ) ; if ( ! countryCode ) return null ; number = number . substr ( countryCode . length ) ; // Lookup the meta data for the region (or regions) and if the rest of // the number parses for that region, return the parsed number. var entry = dataBase [ countryCode ] ; if ( Array . isArray ( entry ) ) { for ( var n = 0 ; n < entry . length ; ++ n ) { if ( typeof entry [ n ] == "string" ) entry [ n ] = ParseMetaData ( countryCode , entry [ n ] ) ; if ( n > 0 ) entry [ n ] . formats = entry [ 0 ] . formats ; ret = ParseNationalNumber ( number , entry [ n ] ) if ( ret ) return ret ; } return null ; } if ( typeof entry == "string" ) entry = dataBase [ countryCode ] = ParseMetaData ( countryCode , entry ) ; return ParseNationalNumber ( number , entry ) ; }
Parse an international number that starts with the country code. Return null if the number is not a valid international number.
Parse an international number that starts with the country code . Return null if the number is not a valid international number .