API reference › @evolu/common › Array › firstInArray
function firstInArray<T>(array: readonly [T, T]): T;
Defined in: packages/common/src/Array.ts:879
Returns the first element of a non-empty array.
Reading the first value
import { firstInArray } from "@evolu/common";
expect(firstInArray(["a", "b", "c"])).toBe("a");