Björn f184cd7e2a | 4 years ago | |
---|---|---|
.. | ||
LICENSE | 4 years ago | |
README.md | 4 years ago | |
curri.js | 4 years ago | |
index.next.js | 4 years ago | |
package.json | 4 years ago |
curri
in some Italian 🇮🇹 dialects meansrun
import curry from 'curri'
const add = (a, b) => a + b
const add3 = curry(add)(3)
console.log(add3(5)) // 8
Function to curry any javascript method
Parameters
fn
Function the target function we want to curryacc
...[args] initial argumentsReturns (Function | any) it will return a function until the target function will receive all of its arguments