Retrieves the element at a given index from an input sync iterable.
A function that accepts an input sync iterable and returns the element at the specified index.
const input = [1, 2, 3];const elementAtIndex2 = atSync<number>(2)(input);console.log(elementAtIndex2); // Logs 3
Available as at when imported from peter-piper/sync.
at
peter-piper/sync
The type of elements in the input sync iterable.
The index of the element to retrieve.
Generated using TypeDoc
Retrieves the element at a given index from an input sync iterable.
Returns
A function that accepts an input sync iterable and returns the element at the specified index.
Example
Remarks
Available as
at
when imported frompeter-piper/sync
.