1.1.0 • Published 6 years ago

get-ip-addresses v1.1.0

Weekly downloads
80
License
MIT
Repository
github
Last release
6 years ago

get-ip-addresses

Returns array of IPV4 Address for this machine.

Install

npm i get-ip-addresses -S

Use

ES6

import getIpAddresses from 'get-ip-addresses';
console.log(getIpAddresses());

Ye Olde

var getIpAddresses = require('get-ip-addresses').getIpAddresses;
console.log(getIpAddresses());

Refresh IP Addresses

By default, the list of IP addresses is cached. To force a refresh, you can pass an additional parameter.

getIpAddresses(true);

Kudos

Liberated from this StackOverflow answer: http://stackoverflow.com/a/8440736

Ryan Boucher