Closed Richienb closed 2 years ago
import publicIp, {publicIpv4, publicIpv6} from 'public-ip'; console.log(await publicIpv4()); //=> '46.5.21.123' console.log(await publicIpv6()); //=> 'fe80::200:f8ff:fe21:67cf' console.log(await publicIp()); // Falls back to IPv4 //=> 'fe80::200:f8ff:fe21:67cf'
Fixes #45, Fixes #59
@sindresorhus
Fixes #45, Fixes #59