# gen-graph

> gen-graph

Latest version **0.1.4** (published 2014-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install gen-graph
pnpm add gen-graph
yarn add gen-graph
bun add gen-graph
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2014-08-28 |
| First published | 2014-07-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | villadora |
| Maintainers | villadora, kael, spud |
| Keywords | gen-graph |

## Links

- npm: https://www.npmjs.com/package/gen-graph
- Repository: https://github.com/villadora/gen-graph
- Issues: https://github.com/villadora/gen-graph/issues
- npm.io page: https://npm.io/package/gen-graph

## Dependencies (1)

- [multimap](https://npm.io/package/multimap.md) 0.0.2

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2014-08-28
- 0.1.3 — 2014-08-28
- 0.1.2 — 2014-08-28
- 0.1.1 — 2014-07-17
- 0.1.0 — 2014-07-17

## README

# gen-graph [![NPM version](https://badge.fury.io/js/gen-graph.svg)](http://badge.fury.io/js/gen-graph) [![Build Status](https://travis-ci.org/villadora/gen-graph.svg?branch=master)](https://travis-ci.org/villadora/gen-graph) [![Dependency Status](https://gemnasium.com/villadora/gen-graph.svg)](https://gemnasium.com/villadora/gen-graph)


## Install

```bash
$ npm install gen-graph --save
```

## Usage

```js
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.

```js
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

---
_Source: https://npm.io/package/gen-graph · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
