(function Xcon () {

    "use strict";

    // future-proof against vender expansions to browser console
    if (this.out || this.run) {
        window.xcon = {};
        return Xcon.call(window.xcon);
    }

    // private method that takes a raw input and determines
    // its primitive type.  Outputs all input as a string.
    function condition (blob) {
        var type = typeof blob;
        switch (type) {
            case 'number' || 'boolean' || 'function':
                blob = blob.toString();
                break;
            case 'object':
                type = blob instanceof Array ? 'array' : 'object';
                type = blob !== null ? type : 'null';
                blob = JSON.stringify(blob);
                break;
            case 'undefined':
                blob = 'undefined';
                break;
        }
        return {
            "type": type,
            "text": blob
        };
    }

    // returns a random color to improve contrast between
    // adjacent .out logs.  Colors should be non-red and
    // non-green to differentiate between .run() and .out()
    // logs.
    function colorSelect () {
        var outColors = [
            'blue',
            'darkgray',
            'black',
            'darkorange',
            'chocolate',
            'brown',
            'darkmagenta',
            'darkgoldenrod',
            'darkslateblue',
            'dimgray',
            'indigo',
            'maroon',
            'midnightblue',
            'navy',
            'purple',
            'royalblue',
            'sienna',
            'saddlebrown',
            'slateblue',
            'slategray',
            'teal',
            'steelblue'
        ],
        random = Math.floor(Math.random() * outColors.length);
        return outColors[random];
    }

    // skins a console.log message to display the primitive type as well
    // as the expected output of a vanilla .log() command
    // opts: {
    //     "color": "#f9f9f9", // specify a css color
    //     "log": true //
    // }
    // sometimes this function is called from console.run() to output
    // function return values.  In that case,
    // opts: {
    //     "color": "darkgreen", // or red
    //     "fnName": "nameOfFunction",
    //     "fnArgs": "all passed arguments",
    //     "error": true // indicates a thrown error
    // }
    this.out = function (blob, opts) {
        opts = opts || {};
        var props = condition(blob),
            type = props.type,
            text = props.text || '',
            color = opts.color || colorSelect(),
            fontWeight = opts.fnName ? "bold" : "normal";
        type = opts.error ? 'error' : type;
        type = opts.fnName ? opts.fnName + '(' +
            opts.fnArgs + ') returns ' + type : type;
        console.log("%c" + type + ":\n" + text,
            "color:" + color + ";font-weight:" + fontWeight);
        if (opts.log) {
            console.log(blob);
        }
    };

    // given a function, calls that function, returns the output,
    // and calls .out() to skin the output in green (success)
    // or red (failure).  Arguments, function name, and any error
    // messages are logged.
    this.run = function (fn, args, context) {
        if (typeof fn === 'function') {
            context = context || this;
            args = args || [];
            var n, result;
            try {
                result = fn.apply(context, args);
                this.out(result, {
                    "color": 'darkgreen',
                    "fnName": fn.name || 'anonymous function',
                    "fnArgs": args.toString()
                });
                return result;
            } catch (e) {
                this.out(e.message, {
                    "color": 'red',
                    "fnName": fn.name || 'anonymous function',
                    "fnArgs": args.toString(),
                    "error": true
                });
            }
        } else {
            this.out(arguments[0], arguments[1]);
        }
    };

    return this;

}).call(window.console);

@@ -3266,17 +3266,17 @@
 peof fn 
-=
+!
 == 'func
@@ -3300,63 +3300,76 @@
     
-context = context %7C%7C this;%0A            args = args %7C%7C %5B
+this.out(arguments%5B0%5D, arguments%5B1%5D);%0A            return arguments%5B0
 %5D;%0A 
@@ -3379,31 +3379,72 @@
     
+%7D%0A
     
-var n, result;%0A    
+    context = context %7C%7C this;%0A        args = args %7C%7C %5B%5D;%0A
     
@@ -3465,19 +3465,19 @@
         
-   
+var
  result 
@@ -3507,36 +3507,32 @@
 s);%0A            
-  
-  
 this.out(result,
@@ -3530,28 +3530,24 @@
 t(result, %7B%0A
-    
             
@@ -3580,36 +3580,32 @@
                 
-   
- 
 %22fnName%22: fn.nam
@@ -3639,36 +3639,32 @@
                 
-    
 %22fnArgs%22: args.t
@@ -3681,36 +3681,28 @@
             
-   
- 
 %7D);%0A
-    
             
@@ -3724,20 +3724,16 @@
         
-   
- 
 %7D catch 
@@ -3734,28 +3734,24 @@
 catch (e) %7B%0A
-    
             
@@ -3780,36 +3780,32 @@
                 
-   
- 
 %22color%22: 'red',%0A
@@ -3800,28 +3800,24 @@
 or%22: 'red',%0A
-    
             
@@ -3855,36 +3855,32 @@
 mous function',%0A
-    
                 
@@ -3922,20 +3922,16 @@
         
-    
 %22error%22:
@@ -3952,94 +3952,9 @@
     
-    %7D);%0A            %7D%0A        %7D else %7B%0A            this.out(arguments%5B0%5D, arguments%5B1%5D
+%7D
 );%0A 

refactor .run() to get rid of else{} block