curry-n

1.0.2 • Public • Published

curry-n

Travis Build NPM Version Bithound Status License

Curry a function with specified arity

Install

npm i -S curry-n

Usage

const curryN = require('curry-n')
 
const curried = curryN(3, function(...args) {
    console.log(...args)
})
 
curried(1, 2, 3)
curried(1)(2)(3)
 
const curriedThis = curryN(3, function(...args) {
    console.log(this, ...args)
})
 
curriedThis.call({some: 'this arg'})(1)(2, 3)
curriedThis(1, 2).call('some this arg')(3)

Dev

git clone https://github.com/nhz-io/curry-n
cd curry-n
npm i
npm start

Coverage

npm run coverage
npm run report

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i curry-n

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • ishi.ruy