New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gen-graph

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gen-graph

gen-graph

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-80%
Maintainers
3
Weekly downloads
 
Created
Source

gen-graph NPM version Build Status Dependency Status

Install

$ npm install gen-graph --save

Usage

var graph = require('gen-graph');


var conf = graph(shrinkwrap_json, options);

conf = graph(shrinkwrap);

conf = graph([shrinkwrap1, shrinkwrap2], {
  edge_keys:['dependencies', 'asyncDependencies', 'devDependencies']
});

Generated object will contains '_' property with the root tree's name and version.

var conf = graph({ name: "json", version: "1.0.0"});

// compressed conf will be
{
  0: [ 1.0.0" ],
  _: {
      "json@1.0.0": 0
  }
}

conf = graph({ name: "json", version: "1.0.0"}, { compress: false});

// uncompressed conf will be
{
  0: [ "json@1.0.0" ],
  _: {
      "json@1.0.0": 0
  }
}

So root node can be located fast.

Options

edge_keys {Array=}

Keys will be traveled as edges in graph, like 'devDependencies'. Default is ['dependencies', 'asyncDependencies']

compress {boolean=}

Whether output name in the graph node. Default is true.

Licence

MIT

Keywords

FAQs

Package last updated on 28 Aug 2014

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