Skip to content

Conversation

@lpw
Copy link

@lpw lpw commented Mar 20, 2017

Allow search by length as well as distance via the option

{ byLength: true } 

Add a compareEdge option as well as the compare option for nodes:

{ compareEdge: function( edge ) {} }

and a compareNode option which more strictly checks each node than compare:

{ compareNode: function( node ) {} }

And allow graph's trace to take options like graph's closest already does:

graph.trace( node1, node2, options )

taking care to ensure backwards compatibility (compare behaves as before, and trace can still take just direction).

Ensured all existing tests still pass, added new tests.

Didn't presume to update the README but could be done too.

... see the build failed - could backport to less es6y javascript if important to keep it so.

Lance Welsh added 4 commits March 20, 2017 15:44
@lpw lpw mentioned this pull request Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant