Inspect and query the node_modules directory.
Provides functions to enumerate installed packages, compare against the lockfile, and detect anomalies.
Summary
Functions
Compare installed packages against the lockfile.
Get the total disk size of node_modules in bytes.
Count the total number of files in node_modules.
List all installed packages in node_modules.
Get the installed version of a package by reading its package.json.
Functions
Compare installed packages against the lockfile.
Returns {missing, extra} where:
missing— packages in lockfile but not innode_modulesextra— packages innode_modulesbut not in lockfile
@spec disk_size(String.t()) :: non_neg_integer()
Get the total disk size of node_modules in bytes.
@spec file_count(String.t()) :: non_neg_integer()
Count the total number of files in node_modules.
List all installed packages in node_modules.
Returns a sorted list of package names (including scoped).
Get the installed version of a package by reading its package.json.