function _getSanitizedEntity(entityObj) {
  let lookupValue = entityObj.value;

  if (entityObj.isIPv4 || entityObj.isIPv6) {
    // TC does not recognize fully expanded IPv6 addresses
    // TC does not recognize leading zeroes in IPv6 address octets
    // TC does not recognize IPv6 addresses unless they are lowercase
    // TC does not recognize IPv6 addresses if they use the "compressed" :: form for zeroes
    if (entityObj.isIPv6) {
      if (ipaddr.isValid(lookupValue)) {
        // convert the IPv6 address into a format TC understands
        lookupValue = ipaddr.parse(lookupValue).toNormalizedString();
      } else {
        // Integration Received an invalid IPv6 address
        Logger.warn(`Unsupported IPv6 address format ignored: [${entityObj.value}]`);
        lookupValue = null;
      }
    }
  }

  return lookupValue;
}
/**
 * ThreatConnect has limited support for IPv6 formats.  This method converts the value of the provided entityObj
 * into a valid value for ThreatConnect.  If a conversion cannot be done, the method returns null.
 * @param entityObj
 * @returns {*}
 * @private
 */
ThreatConnect has limited support for IPv6 formats.  This method converts the value of the provided entityObj
into a valid value for ThreatConnect.  If a conversion cannot be done, the method returns null.
@param entityObj
@returns {*}
@private
ThreatConnect has limited support for IPv6 formats . This method converts the value of the provided entityObj into a valid value for ThreatConnect . If a conversion cannot be done the method returns null . @param entityObj @returns { * } @private
function _getSanitizedEntity(entityObj) {
  let lookupValue = entityObj.value;
  if (entityObj.isIPv4 || entityObj.isIPv6) {
    if (entityObj.isIPv6) {
      if (ipaddr.isValid(lookupValue)) {
        lookupValue = ipaddr.parse(lookupValue).toNormalizedString();
      } else {
        Logger.warn(`Unsupported IPv6 address format ignored: [${entityObj.value}]`);
        lookupValue = null;
      }
    }
  }
  return lookupValue;
}
function _getSanitizedEntity ( entityObj ) { let lookupValue = entityObj . value ; if ( entityObj . isIPv4 || entityObj . isIPv6 ) { if ( entityObj . isIPv6 ) { if ( ipaddr . isValid ( lookupValue ) ) { lookupValue = ipaddr . parse ( lookupValue ) . toNormalizedString ( ) ; } else { Logger . warn ( ` ${ entityObj . value } ` ) ; lookupValue = null ; } } } return lookupValue ; }
ThreatConnect has limited support for IPv6 formats.
ThreatConnect has limited support for IPv6 formats .
// TC does not recognize fully expanded IPv6 addresses
 // TC does not recognize leading zeroes in IPv6 address octets
 // TC does not recognize IPv6 addresses unless they are lowercase
 // TC does not recognize IPv6 addresses if they use the "compressed" :: form for zeroes
 // convert the IPv6 address into a format TC understands
 // Integration Received an invalid IPv6 address
