Function: minMax()
minMax(
iterable
):Iterable
<MinMax
<number
>,any
,any
>
Returns an iterable containing a MinMax value of iterable
if
iterable
contains at least one value. Otherwise, returns an empty iterable.
Parameters
• iterable: Iterable
<number
, any
, any
>
Returns
Iterable
<MinMax
<number
>, any
, any
>
Example
console.log(pipe([4, 1, 5, -3], minMax, get))
//=> { min: -3, max: 5 }