From 2fb8d620af8dd663db633c0bc8306937c3ffda4a Mon Sep 17 00:00:00 2001 From: Amila Welihinda Date: Sat, 26 Jan 2019 11:43:43 -0800 Subject: [PATCH] Update readme examples to ES6 --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 58d4ab3..ae3af1b 100644 --- a/README.md +++ b/README.md @@ -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 @@ -11,7 +11,7 @@ Sort directed acyclic graphs then in your code: ```js -toposort = require('toposort') +const toposort = require('toposort') ``` ## Usage @@ -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'] @@ -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']