R.minBy
groupBy
is a really helpful function in these cases. This utilizes it to separate all the values by their date, and then maps over the object to get the minimum rating
const sayWhat = message => next => function(){
const outcome = apply(next,arguments)
console.log(message,outcome);
return outcome;
}
tap(console.log)
proxy
, but is doesn't exists
I need to mitigate the following from returning 'undefined':
const getRole = (roles) => find(
where({ roles: hasSubset(roles) })
);
as my pipeline will fail because the next call expects .. something. Is this a good use case for 'Maybe' ?
defaultTo
ifElse(pipe(nthArg(0),type,equals("Array")),nthArg(0),unapply(identity))
sum(1,2,3)
should work and sum([1,2,3])
compose(flatten, Array.from)(arguments)
ifElse(Array.isArray,identity,unapply(identity))