Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

read-package-tree

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

read-package-tree

Read the contents of node_modules.

  • 5.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
669K
decreased by-33.4%
Maintainers
2
Weekly downloads
 
Created

What is read-package-tree?

The read-package-tree npm package is used to read the dependency tree of a package and list all the dependencies along with their metadata. It reads the node_modules folder recursively and constructs an object representation of the dependency hierarchy.

What are read-package-tree's main functionalities?

Read the entire dependency tree

This feature allows you to read the entire dependency tree of a project. The function takes a path to the project and a callback. The callback is called with an error (if any) and the data representing the package tree.

const rpt = require('read-package-tree');
rpt('/path/to/project', function (er, data) {
  if (er) {
    console.error('Error reading package tree', er);
    return;
  }
  console.log(data);
});

Other packages similar to read-package-tree

FAQs

Package last updated on 29 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc