colour.js
function stylize(str, style) {
        if (colour.mode == 'console') {
            return consoleStyles[style][0] + str + consoleStyles[style][1];
        } else if (colour.mode == 'browser') {
            return browserStyles[style][0] + str + browserStyles[style][1];
        } else if (colour.mode == 'browser-css') {
            return cssStyles[style][0] + str + browserStyles[style][1];
        }
        return str+'';
    }
function stylize(str, style) {
        if (colour.mode == 'console') {
            return consoleStyles[style][0] + str + consoleStyles[style][1];
        } else if (colour.mode == 'browser') {
            return browserStyles[style][0] + str + browserStyles[style][1];
        } else if (colour.mode == 'browser-css') {
            return cssStyles[style][0] + str + browserStyles[style][1];
        }
        return str+'';
    }
function stylize ( str , style ) { if ( colour . mode == 'console' ) { return consoleStyles [ style ] [ 0 ] + str + consoleStyles [ style ] [ 1 ] ; } else if ( colour . mode == 'browser' ) { return browserStyles [ style ] [ 0 ] + str + browserStyles [ style ] [ 1 ] ; } else if ( colour . mode == 'browser-css' ) { return cssStyles [ style ] [ 0 ] + str + browserStyles [ style ] [ 1 ] ; } return str + '' ; }
Applies a style to a string.
@param {string} str String to stylize
@param {string} style Style to apply
@returns {string}
@private
Applies a style to a string .