Function isNonEmptyArray

Determines if an array is not empty.

The type inferred for the array is ReadonlyArray<T>, but the type returned is NonEmptyArray<T>.

NonEmptyArray

isNonEmptyArray([1, 2, 3]); // => true
isNonEmptyArray([]); // => false