Socket
Socket
Sign inDemoInstall

@docusaurus/logger

Package Overview
Dependencies
Maintainers
6
Versions
1040
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docusaurus/logger - npm Package Compare versions

Comparing version 0.0.0-4430 to 0.0.0-4432

14

lib/index.js

@@ -47,5 +47,11 @@ "use strict";

}
function stringify(msg) {
if (String(msg) === '[object Object]') {
return JSON.stringify(msg);
}
return String(msg);
}
function info(msg, ...values) {
console.info(`${chalk_1.default.cyan(chalk_1.default.bold('[INFO]'))} ${values.length === 0
? msg
? stringify(msg)
: interpolate(msg, ...values)}`);

@@ -55,3 +61,3 @@ }

console.warn(chalk_1.default.yellow(`${chalk_1.default.bold('[WARNING]')} ${values.length === 0
? msg
? stringify(msg)
: interpolate(msg, ...values)}`));

@@ -61,3 +67,3 @@ }

console.error(chalk_1.default.red(`${chalk_1.default.bold('[ERROR]')} ${values.length === 0
? msg
? stringify(msg)
: interpolate(msg, ...values)}`));

@@ -67,3 +73,3 @@ }

console.log(`${chalk_1.default.green(chalk_1.default.bold('[SUCCESS]'))} ${values.length === 0
? msg
? stringify(msg)
: interpolate(msg, ...values)}`);

@@ -70,0 +76,0 @@ }

{
"name": "@docusaurus/logger",
"version": "0.0.0-4430",
"version": "0.0.0-4432",
"description": "An encapsulated logger for semantically formatting console messages.",

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

},
"gitHead": "548160af2a7413bdb58a37c37b73ff65be106db9"
"gitHead": "1221cc7c66b95d2207c935645d303be70642514b"
}

@@ -55,2 +55,9 @@ /**

function stringify(msg: unknown): string {
if (String(msg) === '[object Object]') {
return JSON.stringify(msg);
}
return String(msg);
}
function info(msg: unknown): void;

@@ -65,3 +72,3 @@ function info(

values.length === 0
? msg
? stringify(msg)
: interpolate(msg as TemplateStringsArray, ...values)

@@ -81,3 +88,3 @@ }`,

values.length === 0
? msg
? stringify(msg)
: interpolate(msg as TemplateStringsArray, ...values)

@@ -98,3 +105,3 @@ }`,

values.length === 0
? msg
? stringify(msg)
: interpolate(msg as TemplateStringsArray, ...values)

@@ -114,3 +121,3 @@ }`,

values.length === 0
? msg
? stringify(msg)
: interpolate(msg as TemplateStringsArray, ...values)

@@ -117,0 +124,0 @@ }`,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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