Skip to content

partial

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

Usage

const add = (a: number, b: number) => a + b;
const addFive = partial(add, 5);
addFive(2); // => 7

Installation

Terminal window
npx atmx add helper partial