bare-console
Advanced tools
Comparing version 4.0.0 to 4.0.1
10
index.js
@@ -22,7 +22,7 @@ const inspect = require('bare-inspect') | ||
log (...args) { | ||
this._stdout.write(formatArgs(args) + '\n') | ||
this._stdout.write(formatArgs(args, { colors: this._colors }) + '\n') | ||
} | ||
error (...args) { | ||
this._stderr.write(formatArgs(args) + '\n') | ||
this._stderr.write(formatArgs(args, { colors: this._colors }) + '\n') | ||
} | ||
@@ -56,3 +56,3 @@ | ||
trace (...args) { | ||
const err = { name: 'Trace', message: formatArgs(args) } | ||
const err = { name: 'Trace', message: formatArgs(args, { colors: this._colors }) } | ||
Error.captureStackTrace(err, this.trace) | ||
@@ -67,3 +67,3 @@ this.error(err.stack) | ||
function formatArgs (args) { | ||
function formatArgs (args, opts) { | ||
let out = '' | ||
@@ -76,3 +76,3 @@ let first = true | ||
out += typeof arg === 'string' ? arg : inspect(arg, { colors: this._colors }) | ||
out += typeof arg === 'string' ? arg : inspect(arg, opts) | ||
} | ||
@@ -79,0 +79,0 @@ |
{ | ||
"name": "bare-console", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Simple debugging console for JavaScript", | ||
@@ -14,3 +14,3 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "https://github.com/holepunchto/bare-console.git" | ||
"url": "git+https://github.com/holepunchto/bare-console.git" | ||
}, | ||
@@ -17,0 +17,0 @@ "author": "Holepunch", |
14396