How to use the comb.isArray function in comb

To help you get started, we’ve selected a few comb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github C2FO / patio / test / runner.js View on Github external
function populateCoverage(cov) {
    cov.LOC = cov.SLOC = cov.totalHits = cov.totalMisses = cov.coverage = 0;
    var files = [];
    for (var name in cov) {
        var file = cov[name];
        if (comb.isArray(file)) {
            // Stats
            files.push(file);
            delete cov[name];
            cov.totalHits += file.totalHits = coverage(file, true);
            cov.totalMisses += file.totalMisses = coverage(file, false);
            cov.SLOC += file.SLOC = file.totalHits + file.totalMisses;
            !file.source && (file.source = []);
            cov.LOC += file.LOC = file.source.length;
            file.coverage = ((file.totalHits / file.SLOC) * 100).toFixed(2);
            // Source
            file.name = name;
            if (file.coverage < 100) {
                var width = file.source.length.toString().length;
                file.source = file.source.map(
                    function (line, i) {
                        ++i;
github doug-martin / grunt-link / tasks / lib / linker.js View on Github external
function exec(cmds) {
        if (!comb.isArray(cmds)) {
            cmds = [cmds];
        }
        return comb.async.array(cmds).forEach(function (cmd) {
            if (cmd) {
                log.debug(util.format("Executing %s %s", cmd.cmd, cmd.args.join(" ")));
                var child = execP(cmd.cmd, cmd.args, { stdio: "inherit" }),
                    ret = new comb.Promise();

                child.on("close", function (code) {
                    if (code !== 0) {
                        ret.errback(new Error("ps process exited with code " + code));
                    } else {
                        ret.callback();
                    }
                });
                child.on("error", ret.errback);
github C2FO / patio / example / associations / manyToMany.alternateKeys.example.js View on Github external
enroll: function (clas) {
            if (comb.isArray(clas)) {
                return this.addClasses(clas);
            } else {
                return this.addClass(clas);
            }
        }
    },
github C2FO / patio / example / associations / manyToMany.alternateJoinTable.example.js View on Github external
enroll: function (clas) {
            if (comb.isArray(clas)) {
                return this.addClasses(clas);
            } else {
                return this.addClass(clas);
            }
        }
    },
github C2FO / patio / example / associations / manyToMany.alternatePrimaryKeys.example.js View on Github external
enroll: function (clas) {
            if (comb.isArray(clas)) {
                return this.addClasses(clas);
            } else {
                return this.addClass(clas);
            }
        }
    },
github C2FO / patio / example / associations / manyToMany.example.js View on Github external
enroll: function (clas) {
            if (comb.isArray(clas)) {
                return this.addClasses(clas);
            } else {
                return this.addClass(clas);
            }
        }
    },