forked from orbit-oss/chalk
use String constructor rather than + for coercion
This commit is contained in:
parent
23eab5cdf4
commit
e12289964d
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
|
@ -28,7 +28,7 @@ var styles = (function () {
|
|||
|
||||
function applyStyle() {
|
||||
// support varags, but simply cast to string in case there's only one arg
|
||||
var str = arguments.length === 1 ? arguments[0] + '' : [].slice.call(arguments).join(' ');
|
||||
var str = arguments.length === 1 ? String(arguments[0]) : [].slice.call(arguments).join(' ');
|
||||
|
||||
if (!chalk.enabled || !str) {
|
||||
return str;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue