code: function getAddress(loopback, opt_family) {
    var family = opt_family || 'IPv4';
    var addresses = [];
  
    var interfaces;
    if (loopback) {
      var lo = getLoInterface();
      interfaces = lo ? [lo] : null;
    }
    interfaces = interfaces || os.networkInterfaces();
    for (var key in interfaces) {
      interfaces[key].forEach(function(ipAddress) {
        if (ipAddress.family === family &&
            ipAddress.internal === loopback) {
          addresses.push(ipAddress.address);
        }
      });
    }
    return addresses[0];
  }
docs: Queries the system network interfaces for an IP address.
  @param {boolean} loopback Whether to find a loopback address.
  @param {string=} opt_family The IP family (IPv4 or IPv6). Defaults to IPv4.
  @return {string} The located IP address or undefined.