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