topolysis
Topologically sort directed acyclic graph with fast tracking
Getting Started
$ npm install --save topolysis
Usage
'use strict'
const topolysis = require('topolysis')
const data = {
'tie your shoes': ['put on your shoes'],
'put on your shoes': ['put on your shorts'],
'put on your jacket': ['put on your shirt', 'put on your shorts']
}
for (const x of topolysis(data)) {
console.log(x)
}
// [ 'put on your shirt', 'put on your shorts' ]
// [ 'put on your jacket', 'put on your shoes' ]
// [ 'tie your shoes' ]
License
Copyright (c) 2016 Mark Milstein mailto:mark@epiloque.com
topolysis is licensed under the MIT License
http://www.opensource.org/licenses/MIT