dot-curry

0.0.2 • Public • Published

Build Status

browser support

dot-curry

non-intrusive, chainable curry function

Getting Started

Install it to your project:

npm install --save dot-curry

Require it in your file:

var curry = require( 'dot-curry' );

Add the curry method to a function you wish to curry:

function f( a, b, c ) {
  return a ? b : c;
}
 
f.curry = curry;

Use the curry method when needed:

f( 0, 1, 2); // 2
f.curry( 0 )( 1, 2 ); // 2
f.curry( 0 ).curry( 1 )( 2 ); // 2
f.curry( 0 ).curry( 1 ).curry( 2 )(); // 2
 
var f0 = f.curry( 0 );
f0( 1, 2 ); // 2

Package Sidebar

Install

npm i dot-curry

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • autosponge