Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

missing 'first' pipe #41

@nirsalon

Description

@nirsalon

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[X] feature request

Current behavior
No pipe returns the first element that matches a condition

Expected behavior
A new pipe, similar to 'where', that returns the first element that matches the condition
See .NET linq .First() https://msdn.microsoft.com/en-us/library/bb535050(v=vs.110).aspx

What is the motivation / use case for changing the behavior?
A more performant pipe than (arr | where:[cond])[0]

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