https://github.com/distributedlife/get-ip-addresses
Returns a list of IPV4 addresses for the computer the script is run on
https://github.com/distributedlife/get-ip-addresses
ipv4-address
Last synced: about 2 months ago
JSON representation
Returns a list of IPV4 addresses for the computer the script is run on
- Host: GitHub
- URL: https://github.com/distributedlife/get-ip-addresses
- Owner: distributedlife
- License: mit
- Created: 2016-01-13T22:09:49.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-11-17T10:54:03.000Z (over 8 years ago)
- Last Synced: 2025-12-26T20:58:05.205Z (6 months ago)
- Topics: ipv4-address
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# get-ip-addresses
Returns array of IPV4 Address for this machine.
## Install
~~~shell
npm i get-ip-addresses -S
~~~
## Use
### ES6
~~~es6
import getIpAddresses from 'get-ip-addresses';
console.log(getIpAddresses());
~~~
### Ye Olde
~~~javascript
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.
~~~es6
getIpAddresses(true);
~~~
## Kudos
Liberated from this StackOverflow answer: http://stackoverflow.com/a/8440736
Ryan Boucher