gruntjs/grunt — pull request #560 by jaredstehler (2012-12-06 02:08:50+00:00)
Title: "Colorized" attrs rendered as object arrays in no-color mode

I'm experiencing a problem with the no-color mode, in that when one of the meta attrs put in place by the colors.js plugin is written to console.log, it shows up in the output as an array.

Here's an example:

console.log( "Expected \'1\' to equal undefined".red );

output:

{ '0': 'E',
'1': 'x',
'2': 'p',
'3': 'e',
'4': 'c',
'5': 't',
'6': 'e',
'7': 'd',
'8': ' ',
'9': '\'',
'10': '1',
'11': '\'',
'12': ' ',
'13': 't',
'14': 'o',
'15': ' ',
'16': 'e',
'17': 'q',
'18': 'u',
'19': 'a',
'20': 'l',
'21': ' ',
'22': 'u',
'23': 'n',
'24': 'd',
'25': 'e',
'26': 'f',
'27': 'i',
'28': 'n',
'29': 'e',
'30': 'd',
'31': '.' }

This seems to have something to do with the use of utils.toArray() on the arguments object.

As I was poking around in colors.js, I found that you can set the mode to 'none' to turn off colorization, so my commit also removes the replacement of the getter attrs with that much simpler config setting.