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