NPM.TreeFormat (NPM v0.6.0)

Copy Markdown View Source

Formats dependency trees for terminal display.

Summary

Functions

Counts the total packages in the tree.

Formats a flat dependency map as a tree string.

Formats a single package entry with version.

Returns max depth of the dependency tree.

Formats dependency count summary.

Functions

count(lockfile)

@spec count(map()) :: non_neg_integer()

Counts the total packages in the tree.

format(lockfile, opts \\ [])

@spec format(
  map(),
  keyword()
) :: String.t()

Formats a flat dependency map as a tree string.

format_entry(name, arg2)

@spec format_entry(String.t(), map()) :: String.t()

Formats a single package entry with version.

max_depth(lockfile)

@spec max_depth(map()) :: non_neg_integer()

Returns max depth of the dependency tree.

summary(lockfile)

@spec summary(map()) :: String.t()

Formats dependency count summary.