mcpartial
v0.0.48
Published
partial application for destructured object keyword arguments
Readme
mcpartial
partial application is v fun, but what about when you are destructuring an object in your function arguments like keyword arguments?
mcpartial will merge the object you pass it on creation with the object the
returned function gets call with, like this:
const mcpartial = require('mcpartial')
function addXToY({x, y}) {
return x + y
}
const addXTo2 = mcpartial(addXToY, {y: 2})
addXTo2({x: 45}) //=> 47okay thanks everybody bye
