How to use the cowsay.list function in cowsay

To help you get started, we’ve selected a few cowsay 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 IonicaBizau / tilda / examples / index.js View on Github external
]).on("list", action => {
    cowsay.list((err, list) => {
        if (err) { return this.exit(err); }
        let str = list.join(action.options.list.is_provided ? "\n" : ", ")
        console.log(str);
    });
}).main(action => {
    console.log(cowsay.say({
github tvdstaaij / nocto / plugins / cowsay / cowsay.js View on Github external
handlers.enable = function(cb) {
    cowsay.list(function(err, result) {
        cows = _.difference(result, config.blacklist || []);
        if (!err) {
            _.forEach(cows, function (cow) {
                cowsay.say({f: cow, text: 'a'});
            });
            cows.sort(function(a, b) {
                function determineScore(v) {
                    switch (v) {
                        case 'default': return -3;
                        case 'tux': return -2;
                        case 'sheep': return -1;
                        default: return v.length;
                    }
                }
                var scoreDelta = determineScore(a) - determineScore(b);
                if (scoreDelta) return scoreDelta;

cowsay

cowsay is a configurable talking cow

MIT
Latest version published 9 months ago

Package Health Score

66 / 100
Full package analysis