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

broccoli-viz

Package Overview
Dependencies
Maintainers
5
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-viz - npm Package Compare versions

Comparing version 3.1.3 to 4.0.0

lib/normalize-nodes.js

10

lib/build-graph.js

@@ -0,2 +1,5 @@

'use strict';
var nodesById = require('./nodes-by-id');
const normalizeNodes = require('./normalize-nodes');

@@ -72,7 +75,8 @@ /**

var options = _options || {};
var byId = nodesById(nodes);
let normalizedNodes = normalizeNodes(nodes);
var byId = nodesById(normalizedNodes);
var graph = {
let graph = {
nodesById: byId,
nodes: nodes,
nodes: normalizedNodes,
};

@@ -79,0 +83,0 @@

@@ -62,4 +62,4 @@ var statsGlob = require('./stats-glob');

out += ' ' + node._id;
var annotation = node.id.name;
out += ' ' + node.id;
var annotation = node.label.name;
annotation = annotation.replace(' (', '\\n(');

@@ -81,3 +81,3 @@

out += ' [shape=' + shape + ', style=' + style + ', colorscheme="rdylbu9", color=' + selfTimeColor(selfTime) +', label="' +
node._id + '\\n' +
node.id + '\\n' +
annotation + '\\n' +

@@ -93,3 +93,3 @@ statsString(node, patterns) +

var level = graph.nodesById[childId].stats._broccoli_viz.level;
out += ' ' + childId + ' -> ' + node._id + ' [penwidth=' + penWidth(level) + ']\n';
out += ' ' + childId + ' -> ' + node.id + ' [penwidth=' + penWidth(level) + ']\n';
});

@@ -96,0 +96,0 @@ });

@@ -0,7 +1,10 @@

'use strict';
module.exports = function nodesById(nodes) {
var result = new Array(nodes.length);
let result = new Array(nodes.length);
nodes.forEach(function(node) {
result[node._id] = node;
result[node.id] = node;
});
return result;
}
{
"name": "broccoli-viz",
"version": "3.1.3",
"version": "4.0.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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