Skip to content
On this page

min

Returns the minimum number of an array.

Usage

ts
import { min } from '@screaming/utils'

min([1, 2, 3, 4, 5])
// 1
1
2
3
4

Type Definitions

ts
/**
 * @param array - The array of numbers.
 * @returns The minimum number.
 */
export declare function min(array: readonly number[]): number | undefined
1
2
3
4
5