minOr
ts
function Array.minOr<T>(
target: readonly number[],
or: T,
): number | TReturns the minimum value in the number array, or fallback if the array is empty.
Example
ts
import { Array } from "@monstermann/array";
Array.minOr([5, 1, 3, 2], 0); // 1ts
import { Array } from "@monstermann/array";
pipe([5, 1, 3, 2], Array.minOr(0)); // 1