UNPKG

444 BTypeScriptView Raw
1/**
2 * @param {Array} arr The array to iterate over.
3 * @return {*} Returns the minimum value.
4 * @example
5 *
6 * min([1, 2]);
7 * // => 1
8 *
9 * min([]);
10 * // => undefined
11 *
12 * const data = new Array(1250010).fill(1).map((d,idx) => idx);
13 *
14 * min(data);
15 * // => 1250010
16 * // Math.min(...data) will encounter "Maximum call stack size exceeded" error
17 */
18declare const _default: (arr: number[]) => number | undefined;
19export default _default;