curry-n
v1.0.2
Published
Curry a function with specified arity
Downloads
10
Readme
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