traverse.js
function toArray (span, root) {
  if(!span[root]) return null
  var a = [root]
  while(span[root])
    a.push(root = span[root])
  return a.reverse()
}
function toArray (span, root) {
  if(!span[root]) return null
  var a = [root]
  while(span[root])
    a.push(root = span[root])
  return a.reverse()
}
function toArray ( span , root ) { if ( ! span [ root ] ) return null var a = [ root ] while ( span [ root ] ) a . push ( root = span [ root ] ) return a . reverse ( ) }
find the shortest path between two nodes. if there was no path within max hops, return null. convert a spanning tree to an array.
find the shortest path between two nodes . if there was no path within max hops return null . convert a spanning tree to an array .