mirror of
https://github.com/flynx/colors.js.git
synced 2026-01-10 04:31:19 +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>']
|
'yellow' : ['<span style="color:yellow;">', '</span>']
|
||||||
};
|
};
|
||||||
} else if (exports.mode === 'none') {
|
} else if (exports.mode === 'none') {
|
||||||
return str;
|
return str+'';
|
||||||
} else {
|
} else {
|
||||||
console.log('unsupported mode, try "browser", "console" or "none"');
|
console.log('unsupported mode, try "browser", "console" or "none"');
|
||||||
}
|
}
|
||||||
@ -301,4 +301,4 @@ function zalgo(text, options) {
|
|||||||
// don't summon zalgo
|
// don't summon zalgo
|
||||||
addProperty('zalgo', function () {
|
addProperty('zalgo', function () {
|
||||||
return zalgo(this);
|
return zalgo(this);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user