Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

curri

GianlucaGuarini2.1kMIT2.0.3TypeScript support: included

Minimal curry implementation

curry, currying, functional

readme

curri

curri.js

curri in some Italian :it: dialects means run

Build Status NPM version NPM downloads MIT License

Usage

import curry from 'curri'

const add = (a, b) => a + b
const add3 = curry(add)(3)

console.log(add3(5)) // 8

API

curry

Function to curry any javascript method

Parameters

  • fn Function the target function we want to curry
  • acc ...[args] initial arguments

Returns (Function | any) it will return a function until the target function will receive all of its arguments