computeOrphans function

List<String> computeOrphans(
  1. Model model
)

A node that has inDegree and outDegree of 0 is an orphan.

Implementation

List<String> computeOrphans(Model model) => model.nodes.values
    .where((node) => node.inDegree == 0 && node.outDegree == 0)
    .map((node) => node.id)
    .toList();