Socket
Socket
Sign inDemoInstall

jsviz

Package Overview
Dependencies
12
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jsviz

For visualizing the internal and external dependencies of a JavaScript codebase. Takes a directory to analyze and outputs a graph representation in HTML.


Version published
Weekly downloads
2
Maintainers
1
Install size
1.27 MB
Created
Weekly downloads
 

Readme

Source

jsviz

For visualizing the internal and external dependencies of a JavaScript codebase. Takes a directory to analyze and outputs a graph representation in HTML.

Uses esprima and estraverse to walk the syntax tree, pick out any require() calls, and generate a dependency graph. Generates an HTML file and uses d3 to visualize the graph. Example output (of this project):

jsviz of jsviz

Usage

From the command line, pass in a directory (that you want analyed) and an output file:

npm i -g jsviz

jsviz ~/taco-project > taco-project-viz.html

From JavaScript:

npm i jsviz
var jsviz = require('jsviz');

// Grab the dependency graph
jsviz.graph('~/taco-project', function (err, graph) {

});

// Turn the graph into html
jsviz.html(graph, function (err, html) {

});

FAQs

Last updated on 12 Jan 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc