@nathanfaucett/apply

apply for calling functions with array of arguments


Keywords
apply, apply.js
License
MIT
Install
npm install @nathanfaucett/apply@0.0.1

Documentation

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