partob
Create a partob a function
62 bytes
Usage
Modern javascript destructuring means a lot of developers, libraries, and frameworks are all opting for unary functions that take a single object that contains the arguments. The _.partob
function let’s you partob these unary functions.
import * as _ from 'radashi'
const add = (props: { a: number; b: number }) => props.a + props.b
const addFive = _.partob(add, { a: 5 })
addFive({ b: 2 }) // => 7