mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
1.3 KiB
1.3 KiB
Currify

Translate the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single or more arguments.
Install
npm i currify --save
How to use?
let currify = require('currify');
let mean = (a, b, c) => (a + b) / c;
let mean1 = currify(mean, 1);
let mean2 = mean1(2);
let result = mean2(2);
// returns
1.5
License
MIT