Skip to content

Commit 07b00b1

Browse files
authored
Merge pull request #83 from datavis-tech/upgrade-deps-432758943543
Upgrade dependencies, run prettier
2 parents 72e9793 + 8189bc7 commit 07b00b1

40 files changed

Lines changed: 2480 additions & 2837 deletions

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: bahmutov/npm-install@v1
2424

2525
- name: Check types
26-
run: npm run type-check
26+
run: npm run tsc
2727

2828
- name: Test
2929
run: npm run test

.travis.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

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)