Skip to content

first

Returns first element or fallback.

ts
import { first } from '@vielzeug/toolkit';

first([1, 2, 3]); // 1
first([], 9); // 9