code: function normalizeIP(addr) {
    var claimsToBeIPv6 = /:/.test(addr);
    if(claimsToBeIPv6) {
      var ip6 = new Address6(addr);
      if(ip6.valid) {
        return ip6.canonicalForm();
      } else if(ip6.error) {
        throw new Error(ip6.error);
      } else {
        throw new Error("Unknown error while parsing IPv6 address.");
      }
    } else {
      var isIPv4 = false;
      try {
        var ip4 = new Address4(addr);
        isIPv4 = ip4.valid;
      }
      //  Any exception thrown implies not a valid IPv4 address.
      catch(error) {
        throw new Error("Unknown error while parsing IPv4 Address: "+error);
      }
  
      if(isIPv4) {
        return addr;
      }
      else {
        throw new Error("Unknown error while parsing IPv4 Address.");
      }
    }
  }
docs: Normalize an IP address.  Expands "::" notation in IPv6 addresses and
  zero-prefixes each component number (see ipv6.canonical_form()).
  
  @private
  @param {string} addr to be normalized.
  @return {string} Normalized address.