Skip to content

Commit 0893012

Browse files
committed
Upgrade dependencies, run prettier
1 parent 72e9793 commit 0893012

8 files changed

Lines changed: 1702 additions & 2832 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
language: node_js
22
node_js:
3-
- "10"
3+
- '10'

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This library is distributed only via [NPM](npmjs.com). Install by running
2323
Require it in your code like this.
2424

2525
```javascript
26-
const { Graph } = require("graph-data-structure");
26+
const { Graph } = require('graph-data-structure');
2727
```
2828

2929
## Examples
@@ -39,15 +39,15 @@ var graph = Graph();
3939
Add some nodes and edges with **[addNode](#add-node)** and **[addEdge](#add-edge)**.
4040

4141
```javascript
42-
graph.addNode("a");
43-
graph.addNode("b");
44-
graph.addEdge("a", "b");
42+
graph.addNode('a');
43+
graph.addNode('b');
44+
graph.addEdge('a', 'b');
4545
```
4646

4747
Nodes are added implicitly when edges are added.
4848

4949
```javascript
50-
graph.addEdge("b", "c");
50+
graph.addEdge('b', 'c');
5151
```
5252

5353
Now we have the following graph. <img src="https://cloud.githubusercontent.com/assets/68416/15385597/44a10522-1dc0-11e6-9054-2150f851db46.png">
@@ -68,14 +68,14 @@ Here's an example of topological sort with getting dressed (from Cormen et al. "
6868

6969
```javascript
7070
var graph = Graph()
71-
.addEdge("socks", "shoes")
72-
.addEdge("shirt", "belt")
73-
.addEdge("shirt", "tie")
74-
.addEdge("tie", "jacket")
75-
.addEdge("belt", "jacket")
76-
.addEdge("pants", "shoes")
77-
.addEdge("underpants", "pants")
78-
.addEdge("pants", "belt");
71+
.addEdge('socks', 'shoes')
72+
.addEdge('shirt', 'belt')
73+
.addEdge('shirt', 'tie')
74+
.addEdge('tie', 'jacket')
75+
.addEdge('belt', 'jacket')
76+
.addEdge('pants', 'shoes')
77+
.addEdge('underpants', 'pants')
78+
.addEdge('pants', 'belt');
7979

8080
// prints [ "underpants", "pants", "shirt", "tie", "belt", "jacket", "socks", "shoes" ]
8181
console.log(graph.topologicalSort());
@@ -172,8 +172,8 @@ Here's example code for serializing a graph.
172172

173173
```javascript
174174
var graph = Graph();
175-
graph.addEdge("a", "b");
176-
graph.addEdge("b", "c");
175+
graph.addEdge('a', 'b');
176+
graph.addEdge('b', 'c');
177177
var serialized = graph.serialize();
178178
```
179179

0 commit comments

Comments
 (0)