function _modifyWebLinksWithPort(result) {
  if (config.settings.threatConnectPort !== null) {
    const port = config.settings.threatConnectPort;

    if (typeof result.webLink === 'string') {
      result.webLink = _addPortToLink(result.webLink, port);
    }

    if (Array.isArray(result.tag)) {
      result.tag.forEach((tag) => {
        if (typeof tag.webLink === 'string') {
          tag.webLink = _addPortToLink(tag.webLink, port);
        }
      });
    }

    if (Array.isArray(result.groups)) {
      result.groups.forEach((group) => {
        if (typeof group.webLink === 'string') {
          group.webLink = _addPortToLink(group.webLink, port);
        }
      });
    }

    if (Array.isArray(result.indicators)) {
      result.indicators.forEach((indicator) => {
        if (typeof indicator.webLink === 'string') {
          indicator.webLink = _addPortToLink(indicator.webLink, port);
        }
      });
    }
  }
}
/**
 * Mutates the provided `result` object by modifying the webLink properties to include a port.  This is required
 * because the TC REST API does not return proper webLinks when you are running an on-prem TC instance on a port that
 * is not 443.
 *
 * @param result
 * @private
 */
Mutates the provided `result` object by modifying the webLink properties to include a port.  This is required
because the TC REST API does not return proper webLinks when you are running an on-prem TC instance on a port that
is not 443.

@param result
@private
Mutates the provided ` result ` object by modifying the webLink properties to include a port . This is required because the TC REST API does not return proper webLinks when you are running an on - prem TC instance on a port that is not 443 . @param result @private
function _modifyWebLinksWithPort(result) {
  if (config.settings.threatConnectPort !== null) {
    const port = config.settings.threatConnectPort;
    if (typeof result.webLink === 'string') {
      result.webLink = _addPortToLink(result.webLink, port);
    }
    if (Array.isArray(result.tag)) {
      result.tag.forEach((tag) => {
        if (typeof tag.webLink === 'string') {
          tag.webLink = _addPortToLink(tag.webLink, port);
        }
      });
    }
    if (Array.isArray(result.groups)) {
      result.groups.forEach((group) => {
        if (typeof group.webLink === 'string') {
          group.webLink = _addPortToLink(group.webLink, port);
        }
      });
    }
    if (Array.isArray(result.indicators)) {
      result.indicators.forEach((indicator) => {
        if (typeof indicator.webLink === 'string') {
          indicator.webLink = _addPortToLink(indicator.webLink, port);
        }
      });
    }
  }
}
function _modifyWebLinksWithPort ( result ) { if ( config . settings . threatConnectPort !== null ) { const port = config . settings . threatConnectPort ; if ( typeof result . webLink === 'string' ) { result . webLink = _addPortToLink ( result . webLink , port ) ; } if ( Array . isArray ( result . tag ) ) { result . tag . forEach ( ( tag ) => { if ( typeof tag . webLink === 'string' ) { tag . webLink = _addPortToLink ( tag . webLink , port ) ; } } ) ; } if ( Array . isArray ( result . groups ) ) { result . groups . forEach ( ( group ) => { if ( typeof group . webLink === 'string' ) { group . webLink = _addPortToLink ( group . webLink , port ) ; } } ) ; } if ( Array . isArray ( result . indicators ) ) { result . indicators . forEach ( ( indicator ) => { if ( typeof indicator . webLink === 'string' ) { indicator . webLink = _addPortToLink ( indicator . webLink , port ) ; } } ) ; } } }
Mutates the provided `result` object by modifying the webLink properties to include a port.
Mutates the provided ` result ` object by modifying the webLink properties to include a port .