Skip to content

partial

Create a partial a function

68 bytes

Usage

Create a partial function by providing some — or all — of the arguments the given function needs.

import * as _ from 'radashi'
const add = (a: number, b: number) => a + b
const addFive = _.partial(add, 5)
addFive(2) // => 7