Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ipv4

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipv4 - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

24

lib/ipv4.js

@@ -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();

3

package.json
{
"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": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc