Share your code. Components are building blocks, you are the architect.

utils/min-by
v1.1.0
1.1.0
1.0.0
MIT
PUBLIC
3
1     DEPENDENCIES
Build: fail
BuildFail
Build Status: fail
Takes a function and two values, and returns whichever value produces the

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/min-by in your project
npm i @bit/bit.ramda.utils.min-by
Copied

minBy (f:Function, a:*, b:*) : *

Takes a function and two values, and returns whichever value produces the smaller result when passed to the provided function.

Example

//  square :: Number -> Number
     var square = n => n * n;

     R.minBy(square, -3, 2); //=> 2

     R.reduce(R.minBy(square), Infinity, [3, -5, 4, 1, -2]); //=> 1
     R.reduce(R.minBy(square), Infinity, []); //=> Infinity

Arguments

f: Function

a: *

b: *

Returns

*