Socket
Socket
Sign inDemoInstall

node-ipc

Package Overview
Dependencies
Maintainers
9
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-ipc - npm Package Compare versions

Comparing version 8.0.0 to 8.1.0

45

entities/Defaults.js
'use strict';
/*eslint no-magic-numbers: ["error", { "ignore": [ 0] }]*/
/**
* @module entities
*/
const os = require('os');
/**
* @class Defaults
* @description Defaults Entity
*/
class Defaults{
/**
* @constructor
* @method constructor
* @return {void}
*/
constructor(){
const IPType=os.networkInterfaces()[
Object.keys(os.networkInterfaces())[0]
][0].family;

@@ -27,3 +40,3 @@ Object.defineProperties(

writable:true,
value:(IPType=='IPv6')? '::1' : '127.0.0.1'
value: ''
},

@@ -93,3 +106,3 @@ networkPort : {

writable:true,
value:IPType
value: getIPType()
},

@@ -103,5 +116,27 @@ tls : {

);
this.networkHost = (this.IPType == 'IPv6') ? '::1' : '127.0.0.1';
}
}
/**
* method to get ip type
*
* @method getIPType
* @return {string} ip type
*/
function getIPType() {
const networkInterfaces = os.networkInterfaces();
let IPType = '';
if (networkInterfaces
&& Array.isArray(networkInterfaces)
&& networkInterfaces.length > 0) {
// getting the family of first network interface available
IPType = networkInterfaces [
Object.keys( networkInterfaces )[0]
][0].family;
}
return IPType;
}
module.exports=Defaults;

2

package.json
{
"name": "node-ipc",
"version": "8.0.0",
"version": "8.1.0",
"description": "A nodejs module for local and remote Inter Process Communication (IPC), Neural Networking, and able to facilitate machine learning.",

@@ -5,0 +5,0 @@ "main": "node-ipc.js",

Sorry, the diff of this file is not supported yet

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