Merge pull request #10 from mmalecki/none-mode

Add none mode, which doesn't change string
This commit is contained in:
Marak Squires 2011-09-25 01:02:55 -07:00
commit 5f945f0da4

View File

@ -107,8 +107,10 @@ function stylize(str, style) {
'red' : ['<span style="color:red;">', '</span>'], 'red' : ['<span style="color:red;">', '</span>'],
'yellow' : ['<span style="color:yellow;">', '</span>'] 'yellow' : ['<span style="color:yellow;">', '</span>']
}; };
} else if (exports.mode == 'none') {
return str;
} else { } else {
console.log('unsupported mode, try "browser" or "console"'); console.log('unsupported mode, try "browser", "console" or "none"');
} }
return styles[style][0] + str + styles[style][1]; return styles[style][0] + str + styles[style][1];