New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ck-curry

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ck-curry

Simple ES6 curry functions

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

Curry

Simple ES6 curry functions

Usage

$ npm install ck-curry --save

Node

/// ES Modules
import {curry, curryAll} from 'ck-curry'

// node
var curry = require("ck-curry").curry
var curryAll = require("ck-curry").curryAll
let f = (a, b, c) => {
  console.log(a, b, c)
}

let g = (a, b, c) => {
  console.log(a + 1 , b + 2, c + 3)
}

// Curry
const a = curry(f)
// => fn
const b = b(1)
// => fn
const c = b(2)
// => fn
c(3)
// => 1, 2, 3

// Curry All
[f, g] = curryAll(f, g)
f(1)
// => fn
f(1)(1)
// => fn
f(1)(1)(1)
// => 1, 1, 1
g(1)
// => fn
g(1)(1)
// => fn
g(1)(1)(1)
// => 2, 3, 4

License

MIT - see LICENSE.md

Keywords

curry

FAQs

Package last updated on 19 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts