lib/connection.js
function wrapIPv6Address (host, port) {
  if (!port) {
    if (host.indexOf('[') === 0) return host
    host = host.split(':')
    port = host[1]
    host = host[0]
  }
  return '[' + host + ']:' + port
}
function wrapIPv6Address (host, port) {
  if (!port) {
    if (host.indexOf('[') === 0) return host
    host = host.split(':')
    port = host[1]
    host = host[0]
  }
  return '[' + host + ']:' + port
}
function wrapIPv6Address ( host , port ) { if ( ! port ) { if ( host . indexOf ( '[' ) === 0 ) return host host = host . split ( ':' ) port = host [ 1 ] host = host [ 0 ] } return '[' + host + ']:' + port }
support IPv6 https://www.ietf.org/rfc/rfc2732.txt
support IPv6 https : // www . ietf . org / rfc / rfc2732 . txt