logd-console-output
Advanced tools
Comparing version 1.1.1 to 1.2.0
{ | ||
"name": "logd-console-output", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "console output for logd", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -74,23 +74,26 @@ 'use strict'; | ||
if (Array.isArray(structuredFrames)) { | ||
// remove the first frame if it contains the error message | ||
if (structuredFrames.length && structuredFrames[0].text && structuredFrames[0].text.includes(value.message)) { | ||
structuredFrames = structuredFrames.slice(1); | ||
} | ||
// remove the first frame if it contains the error message | ||
if (structuredFrames.length && structuredFrames[0].text && structuredFrames[0].text.includes(value.message)) { | ||
structuredFrames = structuredFrames.slice(1); | ||
} | ||
// print the frames | ||
structuredFrames.forEach((frame) => { | ||
context.newLine(); | ||
context.print(this.decorate(context, this.pad(this.truncateLeft(frame.fileName || 'n/a')), 'path')); | ||
if (frame.lineNumber) context.print(this.decorate(context, this.pad(`${frame.lineNumber}`, 5), 'line')); | ||
else context.print(' '.repeat(5)); | ||
// print the frames | ||
structuredFrames.forEach((frame) => { | ||
context.newLine(); | ||
context.print(this.decorate(context, this.pad(this.truncateLeft(frame.fileName || 'n/a')), 'path')); | ||
if (frame.lineNumber) context.print(this.decorate(context, this.pad(`${frame.lineNumber}`, 5), 'line')); | ||
else context.print(' '.repeat(5)); | ||
if (frame.character) context.print(this.decorate(context, this.pad(`:${frame.character} `, 5, true), 'decoration')); | ||
else context.print(' '.repeat(5)); | ||
if (frame.character) context.print(this.decorate(context, this.pad(`:${frame.character} `, 5, true), 'decoration')); | ||
else context.print(' '.repeat(5)); | ||
context.print(this.decorate(context, (frame.function || frame.message || '').trim(), 'function')); | ||
if (frame.method) context.print(this.decorate(context, ` (${frame.method})`, 'decoration')); | ||
}); | ||
context.print(this.decorate(context, (frame.function || frame.message || '').trim(), 'function')); | ||
if (frame.method) context.print(this.decorate(context, ` (${frame.method})`, 'decoration')); | ||
}); | ||
} else { | ||
context.print(this.decorate(context, (structuredFrames), 'function')); | ||
} | ||
} | ||
@@ -97,0 +100,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61184
1747