mirror of
https://github.com/flynx/colors.js.git
synced 2025-10-29 11:00:11 +00:00
Fix to coerce object input back to string in null stylize operation
This commit is contained in:
parent
3aed695b49
commit
5ca667df4a
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user