ikown-ip

我知道IP!
I Kown IP!
Install
$ npm i ikown-ip
Usage
const ikownIP = require("ikown-ip");
const ips = ikownIP();
console.log(ips);
result
ikown-ip well tell your current equipment ip list.
This list is sorted. The rules are as follows:
family: IPV4 before IPV6.
ip: ALN IP(Local Area Network IP) before localhost IP.
[
{
name: 'en0',
ip: '192.168.66.191',
family: 'IPv4',
netmask: '255.255.240.0',
mac: '90:9c:4a:d0:0b:82'
},
{
name: 'lo0',
ip: '127.0.0.1',
family: 'IPv4',
netmask: '255.0.0.0',
mac: '00:00:00:00:00:00'
}
]