Basic 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 { partob } from 'radash'

const add = (props: { a: number; b: number }) => props.a + props.b

const addFive = partob(add, { a: 5 })

addFive({ b: 2 }) // => 7

Testing

This _.partob function is 100% covered by tests. See them and contribute at GitHub.

Source

See the source for _.partob on GitHub.