1.2.0 • Published 5 years ago

curry-fn v1.2.0

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

Instalation

npm install curry-fn

How to use

Normal use

const {curry} from 'curry-fn';

const add = (x, y, z) => x + y + z;
const curriedAdd = curry(add);
console.log(curriedAdd(1)(2)(3));
// if you pass more than one arg than the function will ignore them
console.log(curriedAdd(1)(2, 3)(3)); // => 6

Changelog

1.0.0

First release.

1.1.0

Tests added.

1.2.0

For the sake of fudamentalism, I removed somes features, given the fact that unary functions are a requirement in curry, and the potential leading to errors, and misunderstanding about arbitrary parameters sizes in function composition.

Removed features:

  1. Placeholders.
  2. Arbitrary arity.
  3. 1..N parameters per curried function.

Motivation

I just want to write some useful functional code in javascript.

TODO

  1. add tests.
  2. add code coverage.

Feel free to fork and contribute.

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago