parsed-packages
v1.1.0
Published
Parses packages in a project into a simple Map.
Downloads
8
Readme
Parsed Packages
Gets the dependencies of a npm
project. This uses the data from package.json
and listed dependencies to get the dependencies of the project. This will get the in-use version and specified semver range for comparison and returns it as a Map
object.
Installation
npm install parsed-packages
Example Usage
import { getDependencies } from "parsed-packages";
console.log(getDependencies());
// Example Output:
// Map {
// "chalk" => { version: "5.3.0", range: "5.x" },
// "cron" => { version: "3.1.7", range: "latest" },
// "express" => { version: "4.19.2", range: ">=4.17.1 <5.0.0" },
// "localmodule" => { version: "1.0.0", range: "file://../localmodule", type: "local" },
// ...
// }
License
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Repository