Provides statistics about the npm package cache.
Summary
Functions
Estimates cache size on disk.
Formats cache statistics for display.
Formats a byte size in human-readable form.
Computes cache hit/miss statistics for a lockfile.
Computes the hit rate as a percentage.
Lists cached packages with versions.
Functions
@spec disk_size() :: non_neg_integer()
Estimates cache size on disk.
Formats cache statistics for display.
@spec format_size(non_neg_integer()) :: String.t()
Formats a byte size in human-readable form.
@spec hit_miss(map()) :: %{ hits: non_neg_integer(), misses: non_neg_integer(), total: non_neg_integer() }
Computes cache hit/miss statistics for a lockfile.
Computes the hit rate as a percentage.
Lists cached packages with versions.