Function: minWith()
Returns an iterable containing a minimum value of iterable
by comparing the
numerical values of each value, as defined by fn
, if iterable
contains at
least one value. Otherwise, returns an empty iterable.
Example
console.log(
pipe(
[`eating`, `sleeping`, `yawning`],
minWith(value => value.length),
get,
),
)
//=> eating
Since
v0.0.1
Call Signature
minWith<
Value
>(fn
,iterable
):Optional
<Value
>
Type Parameters
• Value
Parameters
fn
(value
) => number
iterable
Iterable
<Value
, any
, any
>
Returns
Optional
<Value
>
Defined in
Call Signature
minWith<
Value
>(fn
): (iterable
) =>Optional
<Value
>
Type Parameters
• Value
Parameters
fn
(value
) => number
Returns
Function
Parameters
iterable
Iterable
<Value
, any
, any
>
Returns
Optional
<Value
>