NateFerrero/cmd.js

View on GitHub
src/lib/divide.js

Summary

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

    this.export = function () {

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