diff --git a/analyze.rb b/analyze.rb index e545c66..881112b 100644 --- a/analyze.rb +++ b/analyze.rb @@ -103,6 +103,7 @@ series.each do |series, files| end edges.uniq! # edges.filter! { |e| e[:from] < e[:to] } +edges.map! { |e| { :from => [e[:from], e[:to]].min, :to => [e[:from], e[:to]].max } }.uniq! puts ("export const nodes = " + JSON.pretty_unparse(data.values) + ";") puts ("export const edges = " + JSON.pretty_unparse(edges) + ";")