Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme examples to ES6 #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Sort directed acyclic graphs

[![Build Status](https://travis-ci.org/marcelklehr/toposort.png)](https://travis-ci.org/marcelklehr/toposort)
[![Build Status](https://travis-ci.org/marcelklehr/toposort.svg)](https://travis-ci.org/marcelklehr/toposort)

## Installation

Expand All @@ -11,7 +11,7 @@ Sort directed acyclic graphs
then in your code:

```js
toposort = require('toposort')
const toposort = require('toposort')
```

## Usage
Expand All @@ -21,7 +21,7 @@ We want to sort the following graph.

```js
// First, we define our edges.
var graph = [
const graph = [
['put on your shoes', 'tie your shoes']
, ['put on your shirt', 'put on your jacket']
, ['put on your shorts', 'put on your jacket']
Expand All @@ -45,7 +45,7 @@ toposort(graph)
It is usually more convenient to specify *dependencies* instead of "sequences".
```js
// This time, edges represent dependencies.
var graph = [
const graph = [
['tie your shoes', 'put on your shoes']
, ['put on your jacket', 'put on your shirt']
, ['put on your shoes', 'put on your shorts']
Expand Down