Formats and renders dependency trees for display.
Provides npm ls style tree output from lockfile data.
Summary
Functions
Builds a tree structure from a lockfile and root dependencies.
Counts total packages in the tree (including nested).
Filters the tree to only show packages matching a pattern.
Flattens a tree to a list of all packages with their depths.
Formats a dependency tree as a string.
Returns the maximum depth of the tree.
Functions
Builds a tree structure from a lockfile and root dependencies.
Returns a nested map representing the dependency tree.
@spec count(map()) :: non_neg_integer()
Counts total packages in the tree (including nested).
Filters the tree to only show packages matching a pattern.
@spec flatten(map(), non_neg_integer()) :: [ {String.t(), String.t(), non_neg_integer()} ]
Flattens a tree to a list of all packages with their depths.
Formats a dependency tree as a string.
@spec max_depth(map()) :: non_neg_integer()
Returns the maximum depth of the tree.