Fix to coerce object input back to string in null stylize operation

This commit is contained in:
cjc 2012-01-19 20:23:50 +10:00
parent 3aed695b49
commit 5ca667df4a

View File

@ -96,7 +96,7 @@ function stylize(str, style) {
'yellow' : ['<span style="color:yellow;">', '</span>']
};
} else if (exports.mode === 'none') {
return str;
return str+'';
} else {
console.log('unsupported mode, try "browser", "console" or "none"');
}
@ -301,4 +301,4 @@ function zalgo(text, options) {
// don't summon zalgo
addProperty('zalgo', function () {
return zalgo(this);
});
});