Home > @wixc3/common > first
Picks the first element of an iterable
Signature:
export declare function first<T>(iterable: Nullable<Iterable<T>>): T | undefined;
Parameter | Type | Description |
---|---|---|
iterable | [Nullable](/core3-utils/common.nullable.html)<Iterable<T>> |
Returns:
T | undefined
undefined for null/empty iterable