Socket
Socket
Sign inDemoInstall

logd-console-output

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logd-console-output - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "logd-console-output",
"version": "1.0.1",
"version": "1.0.2",
"description": "console output for logd",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -24,2 +24,3 @@ 'use strict';

decoration,
options,
}) {

@@ -29,9 +30,19 @@ const source = value.toString().split(/\n/g);

context.print(this.decorate(context, value.name+' ', 'name'));
context.print(this.decorate(context, this.truncate(source[0].slice(0, 80), 80), 'source'));
context.print(this.decorate(context, this.truncate(source[0], options.truncate || 80), 'source'));
let remainginChars = (options.truncate || 20) - source[0].length;
this.truncateWhiteSpace(source.slice(1)).forEach((line) => {
context.newLine();
context.print(this.decorate(context, this.truncate(line.slice(0, 80), 80), 'source'));
});
if (remainginChars > 0) {
this.truncateWhiteSpace(source.slice(1)).map((line) => {
remainginChars -= line.length;
return {
line: line,
remainginChars: remainginChars+line.length,
};
}).filter(line => line.remainginChars > 0).forEach((line) => {
context.newLine();
context.print(this.decorate(context, this.truncate(line.line, line.remainginChars), 'source'));
});
} else context.print(this.decorate(context, ` \u2026`, 'source'));
}

@@ -38,0 +49,0 @@

@@ -150,4 +150,3 @@ 'use strict';

'\u001b[90m[Function] (3 lines)\u001b[39m\u001b[90m: \u001b[39m\u001b[36mtestArrowFunction \u001b[39m\u001b[90m(parameter) => {\u001b[39m',
'\u001b[90m return 1;\u001b[39m',
'\u001b[90m}\u001b[39m',
'\u001b[90m return…\u001b[39m'
]);

@@ -154,0 +153,0 @@ });

@@ -24,2 +24,12 @@ 'use strict';

const aLongFunction = (some, paramters = {}) => {
// the comment is of no use,
const butTheVariable = 'is!';
for (const char of butTheVariable.values()) {
console.log(char);
}
};
log.log({

@@ -39,2 +49,3 @@ callsite,

() => {return 1;},
aLongFunction,
435435,

@@ -41,0 +52,0 @@ Symbol(234234),

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc