NateFerrero/cmd.js

View on GitHub
src/lib/add.js

Summary

Maintainability
A
3 hrs
Test Coverage
(function () {
    'use strict';

    this.export = function () {

        /**
         * Command: add(1)(5) - adds args to each value
         * @author Nate Ferrero
         */
        this.each = function (args, val) {
            args.forEach(function (arg) {
                val += arg;
            });
            return val;
        };
    };
}).call(typeof module === 'undefined' ? this['cmd:lib'].add = {} : this);