Home > @wixc3/common > prev
Find the element before an item
Signature:
export declare function prev<T>(iterable: Nullable<Iterable<T>>, item: T): T | undefined;
Parameter | Type | Description |
---|---|---|
iterable | [Nullable](/core3-utils/common.nullable.html)<Iterable<T>> | |
item | T |
Returns:
T | undefined
undefined if item is first or not found