core3-utils

@wixc3/common on Github

Home > @wixc3/common > at

at() function

Finds element by index, including negative index

Signature:

export declare function at<T>(iterable: Nullable<Iterable<T>>, index: number): T | undefined;

Parameters

Parameter Type Description
iterable [Nullable](/core3-utils/common.nullable.html)<Iterable<T>>
index number

Returns:

T | undefined

undefined if invalid index or null iterable