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

[Feature] Implementing the another "result" function for the $ (selector) function #1551

Closed
PeterVoronov opened this issue Apr 12, 2024 · 0 comments

Comments

@PeterVoronov
Copy link
Contributor

PeterVoronov commented Apr 12, 2024

Is your feature request related to a problem? Please describe.
It's not a problem behind, only small improvement.

Describe the solution you'd like
To implement the new "result" function toArray() returns an array of strings which is an usual array with has all selected id's and you can apply all appropriate arrays methods to it.
The reason of this - in some cases, you need to get the array of strings from the selector, instead of use the current each iterator. Moreover, the source data already presented as an array of strings, so you don't need to iterate it once more time.

Describe alternatives you've considered
Alternative is to call each "result" function to fill an array ...
I.e. "internal" array will initially convert to iterator, and then back to array ...

Additional context
I think it will be useful.
Proposed implementation is in #1549.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants