// formats a log message with options
// to be passed to the .out method
define(['condition', 'color-select'],
function (condition, colorSelect) {
    "use strict";
    function format (blob, opts) {
        opts = opts || {};
        var logMessage,
            logParams,
            props,
            type,
            text = blob,
            color = opts.color || colorSelect(),
            bg = opts.background || '#fff',
            fontWeight = opts.fnName ? "bold" : "normal";

        if (!opts.test) {
            props = condition(blob);
            type = props.type + ':\n';
            text = props.text || '';
            type = opts.error ? 'error:\n' : type;
            type = opts.fnName ? opts.fnName + '(' +
                opts.fnArgs + ') returns ' + type : type;
        }
        type = type || '';

        logMessage = "%c" + type + text;
        logParams = "color:" + color + ";background:" + bg + ";font-weight:" + fontWeight;
        return [logMessage, logParams];
    }
    return format;
});

@@ -171,22 +171,24 @@
 unction 
-format
+prettify
  (blob, 
@@ -250,31 +250,8 @@
 ge,%0A
-            logParams,%0A
     
@@ -310,159 +310,8 @@
 blob
-,%0A            color = opts.color %7C%7C colorSelect(),%0A            bg = opts.background %7C%7C '#fff',%0A            fontWeight = opts.fnName ? %22bold%22 : %22normal%22
 ;%0A%0A 
@@ -673,15 +673,8 @@
 e = 
-%22%25c%22 + 
 type
@@ -681,16 +681,506 @@
  + text;
+%0A        return logMessage;%0A    %7D%0A%0A    function format (blob, opts) %7B%0A        var n,%0A            logMessage = '%25c',%0A            logParams,%0A            color = opts.color %7C%7C colorSelect(),%0A            bg = opts.background %7C%7C '#fff',%0A            fontWeight = opts.fnName ? %22bold%22 : %22normal%22;%0A%0A        blob = blob instanceof Array ? blob : %5Bblob%5D;%0A        for (n in blob) %7B%0A            logMessage += prettify(blob%5Bn%5D, opts);%0A            logMessage += n %3C blob.length - 1 ? '%5Cn' : '';%0A        %7D
 %0A       

allow format.js to iterate through multiple input types