Skip to content
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

Added node search by predicate #718

Merged
merged 2 commits into from
Jul 20, 2020

Conversation

devpolant
Copy link
Contributor

Intention

  • Sometimes we want to search by some custom predicate. We may want to search by some id's prefix, regex, etc.

Updates

  • func nodeBy(tag:) is left, but added func nodeBy(predicate:) which is more customisable (see 'Intention' paragraph).

@ystrot
Copy link
Member

ystrot commented Jul 17, 2020

Hi @AntonPoltoratskyi!

I think it's a good idea, however it would be better to have even more generic approach:

func nodeBy(predicate: (Node) -> Bool) -> Node?

func nodesBy(predicate: (Node) -> Bool) -> [Node]

Could you please update your PR so I can merge your work?

@ystrot ystrot self-assigned this Jul 17, 2020
@ystrot ystrot added this to the 0.9.7 milestone Jul 17, 2020
@devpolant
Copy link
Contributor Author

Sure, I will push updates today or tomorrow

@devpolant
Copy link
Contributor Author

Hi @ystrot ! I pushed updates

@ystrot ystrot merged commit e00baaa into exyte:master Jul 20, 2020
@ystrot
Copy link
Member

ystrot commented Jul 20, 2020

Awesome, thank you! Merged it.

@devpolant devpolant deleted the feature/search-by-predicate branch August 3, 2020 11:31
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.

2 participants