instant-curry

    1.2.0 • Public • Published

    Instant Curry

    Lightweight Function Currying

    import curry from 'instant-curry';
    
    let lazyAdd = curry( (a, b, c, d) => a+b+c+d );
    
    
    lazyAdd(1, 2, 3, 4); // 10
    lazyAdd(1, 2, 3)(4); // 10
    lazyAdd(1, 2)(3, 4); // 10
    lazyAdd(1)(2)(3)(4); // 10
    

    Install

    npm i instant-curry

    DownloadsWeekly Downloads

    0

    Version

    1.2.0

    License

    MIT

    Last publish

    Collaborators

    • tuxsudo