Comparing version 1.0.0 to 1.0.1
10
index.js
@@ -9,3 +9,9 @@ #!/usr/bin/env node | ||
// gets the external IPv4 address | ||
let addresses = networkInterfaces.en1.filter(address => address.family === 'IPv4' && !address.internal); | ||
let addresses = networkInterfaces.en1 | ||
.filter(address => address.family === 'IPv4' && !address.internal) | ||
.map(address => address.address); | ||
// in case you want to use this in another js file | ||
module.exports = addresses; | ||
// print the address to the console | ||
@@ -20,3 +26,3 @@ let chalkMethod; | ||
addresses.forEach(address => { | ||
console.log(chalkMethod(`\n${address.address}\n`)); | ||
console.log(chalkMethod(`\n${address}\n`)); | ||
}); | ||
@@ -23,0 +29,0 @@ process.exit(0); |
{ | ||
"name": "print-ip", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Command-line tool for getting your IP on the LAN", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
1923
29