currify

translate the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single or more arguments

MIT 10 个版本
安装
npm install currify
yarn add currify
pnpm add currify
bun add currify
README

Currify License NPM version Dependency Status Build Status

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?

const currify = require('currify');

const mean = (a, b, c) => (a + b) / c;
const mean1 = currify(mean, 1);
const mean2 = mean1(2);

mean2(2);
// returns
1.5
  • fullstore - functional variables.

  • zames - converts callback-based functions to Promises and apply currying to arguments

  • wraptile - translate the evaluation of a function that takes multiple arguments into evaluating a sequence of 2 functions, each with a any count of arguments.

License

MIT

版本列表
4.0.0 2019-09-19
3.0.0 2018-10-09
2.0.6 2017-07-14
2.0.5 2017-07-14
2.0.4 2017-05-23
2.0.3 2016-12-05
2.0.2 2016-11-23
2.0.1 2016-11-23
2.0.0 2016-11-23
1.0.0 2015-11-10