You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This method, while effective, can be less intuitive and may not clearly convey the developer's intent.
Proposed Solution
I propose adding first() and last() functions to the parser-api. These functions would allow users to directly retrieve the first or last component in a more readable and straightforward manner. The proposed usage would be:
// For the first channelparsedAsyncAPI.channels().all().filter((c)=>c.address()===address).first()// For the last channelparsedAsyncAPI.channels().all().filter((c)=>c.address()===address).last()
The text was updated successfully, but these errors were encountered:
Context:
Currently, when working with AsyncAPI, accessing the first or last component requires using array indexing, like so:
This method, while effective, can be less intuitive and may not clearly convey the developer's intent.
Proposed Solution
I propose adding
first()
andlast()
functions to the parser-api. These functions would allow users to directly retrieve the first or last component in a more readable and straightforward manner. The proposed usage would be:The text was updated successfully, but these errors were encountered: