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

Stop execution on first match #11

Open
cancerberoSgx opened this issue Jun 1, 2019 · 0 comments
Open

Stop execution on first match #11

cancerberoSgx opened this issue Jun 1, 2019 · 0 comments

Comments

@cancerberoSgx
Copy link

Would be awesome to have a parameter in execute() so it stops on first match (and returns a single Node). IMO this feature is commonly supported for query APIs and useful on searches that takes time and only one (or the first one) node is needed. (DOM querySelectorAll() vs querySelector()). Think on somebody querying lots of files in a large project, if only one node is needed then this could save lots of time.

Do you think this would be a viable feature for this project API ?

A couple of nice to haves related to this:

  • adapters being able to stop the search
  • API for pagination or at least result size limit.

Thanks!, great library

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

No branches or pull requests

1 participant