# ngraph.toedgelist

> Save ngraph.graph into edge list

Latest version **0.1.4** (published 2015-10-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install ngraph.toedgelist
pnpm add ngraph.toedgelist
yarn add ngraph.toedgelist
bun add ngraph.toedgelist
```

## 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 | 2015-10-04 |
| First published | 2015-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Andrei Kashcha |
| Maintainers | anvaka |
| Keywords | ngraph, edgelist |

## Links

- npm: https://www.npmjs.com/package/ngraph.toedgelist
- Repository: https://github.com/anvaka/ngraph.toedgelist
- Homepage: https://github.com/anvaka/ngraph.toedgelist#readme
- Issues: https://github.com/anvaka/ngraph.toedgelist/issues
- npm.io page: https://npm.io/package/ngraph.toedgelist

## 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) — 2015-10-04
- 0.1.3 — 2015-07-18
- 0.1.2 — 2015-07-17
- 0.1.1 — 2015-03-24
- 0.1.0 — 2015-03-23

## README

# ngraph.toedgelist [![Build Status](https://travis-ci.org/anvaka/ngraph.toedgelist.svg)](https://travis-ci.org/anvaka/ngraph.toedgelist)

Save [ngraph.graph](https://github.com/anvaka/ngraph.graph) into edge list.

# usage

``` js
// let's say your graph has three edges:
var graph = require('ngraph.graph')();
graph.addLink(1, 2);
graph.addLink(1, 3);
graph.addLink(2, 4);

var toEdgeList = require('ngraph.toedgelist');
var edgeList = toEdgeList(graph);
```

Now `edgeList` is equal to `[ [ 1, 2 ], [ 1, 3 ], [ 2, 4 ] ]`.

## Edge list as a string

You can also save edge list as string:

``` js
var str = toEdgeList.asString(graph);
```

The `str` variable is now equal to:

```
# generated by ngraph.toedgelist
# Nodes: 4
# Edges: 3
# FromId	ToId
1	2
1	3
2	4
```


# install

With [npm](https://npmjs.org) do:

```
npm install ngraph.toedgelist
```

# license

MIT

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