lib/serviceDiscovery/helpers.js
function pushIps(addresses, announced, useInternalAddresses) {
	if (!useInternalAddresses) {
		addresses = addresses.filter((address) => address.internal === false);
	}

	addresses = addresses
		.filter((address) => address.family === 'IPv4')
		.map((address) => address.address);

	return announced.concat(addresses);
}
function pushIps(addresses, announced, useInternalAddresses) {
	if (!useInternalAddresses) {
		addresses = addresses.filter((address) => address.internal === false);
	}

	addresses = addresses
		.filter((address) => address.family === 'IPv4')
		.map((address) => address.address);

	return announced.concat(addresses);
}
function pushIps ( addresses , announced , useInternalAddresses ) { if ( ! useInternalAddresses ) { addresses = addresses . filter ( ( address ) => address . internal === false ) ; } addresses = addresses . filter ( ( address ) => address . family === 'IPv4' ) . map ( ( address ) => address . address ) ; return announced . concat ( addresses ) ; }
Add all valid IP to an existing list of IP

@param {*} addresses
@param {*} announced
@param {*} useInternalAddresses
Add all valid IP to an existing list of IP