Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@compas/insight

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@compas/insight - npm Package Compare versions

Comparing version 0.0.106 to 0.0.107

4

package.json
{
"name": "@compas/insight",
"version": "0.0.106",
"version": "0.0.107",
"description": "Simple logger in NDJSON format",

@@ -35,3 +35,3 @@ "main": "./index.js",

},
"gitHead": "c567f9d3f31a2e19a7cc88f0ea4d19a4e290b597"
"gitHead": "3788c6771ecb63aa83528f821c0572b22b524d3d"
}

@@ -108,3 +108,3 @@ # @compas/insight

For contributing see [contributing.md](https://compasjs.com/contributing).
For contributing see [contributing.md](https://compasjs.com/contributing.html).

@@ -111,0 +111,0 @@ ## New features

@@ -26,10 +26,13 @@ import { inspect } from "util";

export function writePretty(stream, level, timestamp, context, message) {
stream.write(
`${formatDate(timestamp)} ${formatLevelAndType(level, context?.type)}`,
);
let prefix = `${formatDate(timestamp)} ${formatLevelAndType(
level,
context?.type,
)}`;
if (message) {
stream.write(" ");
prefix += " ";
if (Array.isArray(message)) {
stream.write(message.map((it) => formatMessagePretty(it)).join(", "));
stream.write(
`${prefix + message.map((it) => formatMessagePretty(it)).join(", ")}\n`,
);
} else {

@@ -43,9 +46,7 @@ let keyCount = 0;

if (Object.keys(context).length > keyCount) {
stream.write(`${formatMessagePretty(context)} `);
prefix += `${formatMessagePretty(context)} `;
}
stream.write(formatMessagePretty(message));
stream.write(`${prefix + formatMessagePretty(message)}\n`);
}
}
stream.write("\n");
}

@@ -52,0 +53,0 @@

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