HomeDevCentral

Allow to get first item of a collection
90c2f61aa6f0Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Allow to get first item of a collection

Summary:
This changes add to BaseCollection classes the following methods:

  • first() will return the first item if it exists
  • firstOr() will return the first item if it exists, or a default value if not.

Both are implemented by the WithCollection trait.

Test Plan: Tested in Zed

Reviewers: dereckson

Reviewed By: dereckson

Differential Revision: https://devcentral.nasqueron.org/D3197

Details

Provenance
derecksonAuthored on Jun 14 2023, 18:39
derecksonPushed on Jul 1 2023, 20:39
derecksonPushed on Jun 22 2023, 22:00
Parents
rKERUALD9a3d2bdc9f94: Detect BSD as current OS
Branches
Unknown
Tags
Unknown

Event Timeline