Skip to content

Stop execution on first match #11

@cancerberoSgx

Description

@cancerberoSgx

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions