broccoli-viz
Advanced tools
Comparing version 3.1.3 to 4.0.0
@@ -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", |
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
13815
13
367