@nathanfaucett/apply

0.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @nathanfaucett/apply

Weekly Downloads

4

Version

0.0.1

License

MIT

Last publish

Collaborators

  • nathanfaucett