Socket
Socket
Sign inDemoInstall

basic-influence-roles

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.5

5

libs/birs.js

@@ -9,3 +9,6 @@ 'use strict';

// Detect Basic Influence Role
const detect = (indegree, outdegree, nodeCount, data = false) => basicInfluenceRole(indegree, outdegree, nodeCount, data);
const detect = (indegree, outdegree, nodeCount, data) => {
if (indegree >= nodeCount || outdegree >= nodeCount) throw Error('Node count must be greater than indegree or outdegree.');
return basicInfluenceRole(indegree, outdegree, nodeCount, data);
}

@@ -12,0 +15,0 @@ const distribution = data => {

2

package.json
{
"name": "basic-influence-roles",
"version": "1.0.1",
"version": "1.0.5",
"description": "Detect and measure the Basic Influence Role each node holds within a Directed Network.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -124,3 +124,3 @@ # Basic Influence Roles (BIRs) · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/davidemiceli/basic-influence-roles/blob/master/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/davidemiceli/basic-influence-roles/pulls)

// Get the total count of nodes
node_count = 8586987087;
nodeCount = 8586987087;
// For every node in a huge network (use here a distributed loop instead)

@@ -156,9 +156,9 @@ nodes.map(([indegree, outdegree]) => {

role: 'hub',
roleInfluence: 5.83,
roleInfluence: 0.9210526315789473,
roleLevel: 'strong',
influence: 5.83,
influence: 0.9210526315789473,
indegree: 16,
outdegree: 19,
normalizedIndegree: 5.3,
normalizedOutdegree: 6.3,
normalizedIndegree: 0.8421052631578947,
normalizedOutdegree: 1.0,
rank: 1

@@ -169,9 +169,9 @@ },

role: 'emitter',
roleInfluence: 7.3,
roleInfluence: 0.9473684210526315,
roleLevel: 'strong',
influence: 3.6666666666666665,
influence: 0.47368421052631576,
indegree: 0,
outdegree: 22,
outdegree: 18,
normalizedIndegree: 0.0,
normalizedOutdegree: 7.3,
normalizedOutdegree: 0.9473684210526315
rank: 2

@@ -178,0 +178,0 @@ },

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc