Skip to content

Conversation

@devpolant
Copy link

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
Author

Sure, I will push updates today or tomorrow

@devpolant
Copy link
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