Skip to content

Depth by length; compareEdge option; options to trace #4

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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