0.0.1 • Published 8 years ago

@nathanfaucett/apply v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

apply Build Status

apply for calling functions with array of arguments

var apply = require("@nathanfaucett/apply");


function add() {
    var out = 0;

    for (var i = 0, il = arguments.length; i < il; i++) {
        out += arguments[i];
    }
    
    return out;
}

apply(add, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); // 55