Comparing version 0.0.1 to 0.0.2
@@ -15,1 +15,25 @@ /* ================================================================ | ||
"use strict"; | ||
var os = require('os'); | ||
var util = require('xutil'); | ||
/** | ||
* get ipv4 | ||
*/ | ||
function getIpv4() { | ||
var networkInterfaces = os.networkInterfaces(); | ||
var ipv4 = null; | ||
util.each(networkInterfaces,function(networkInterface){ | ||
networkInterface.forEach(function (network) { | ||
if (network.family === 'IPv4' && !network.internal) { | ||
ipv4 = network.address; | ||
return; | ||
} | ||
}); | ||
}); | ||
return ipv4; | ||
}; | ||
module.exports = getIpv4(); | ||
{ | ||
"name": "ipv4", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "ipv4", | ||
@@ -14,2 +14,3 @@ "bin": { | ||
"dependencies": { | ||
"xutil":"0.0.2" | ||
}, | ||
@@ -16,0 +17,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5411
49
1
+ Addedxutil@0.0.2
+ Addedxutil@0.0.2(transitive)