code: function getLocalIPAddress () {
    const ifaces = os.networkInterfaces()
  
    let address = null
    let addresses = null
    let size = null
    let flag = false
  
    for (let ifname in ifaces) {
      addresses = ifaces[ifname]
      size = addresses.length
  
      while (size--) {
        let iface = addresses[size]
        if (iface.family === 'IPv4' && iface.internal === false) {
          address = iface.address
          flag = true
          break
        }
      }
  
      if (flag) break
    }
    return address
  }
docs: 获取本地局域网 IP, 仅支持 ipv4
  
  @return {String} ip