Socket
Socket
Sign inDemoInstall

clrsole

Package Overview
Dependencies
8
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

9

index.js

@@ -22,8 +22,10 @@ 'use strict';

*/
constructor(loggerName, options = {}) {
constructor(loggerName, options) {
super(options);
this.name = loggerName;
this.options = options;
options = this.options;
this._makeLogMethod = this._makeLogMethod.bind(this);
let { levels } = this.options;
let { levels } = options;
if (levels) {

@@ -35,2 +37,3 @@ this.setLevels(levels);

}
this.appenders = (options.appenders || [])

@@ -37,0 +40,0 @@ .concat(ConsoleAppender)

@@ -11,5 +11,5 @@ 'use strict';

*/
constructor(options = {}) {
this.options = options;
const { level } = options;
constructor(options) {
this.options = options || {};
const { level } = this.options;
this.setLevel(level);

@@ -16,0 +16,0 @@ }

@@ -12,3 +12,3 @@ 'use strict';

module.exports = function (options = {}) {
const { datePattern = 'YYYY-MM-DD HH:mm:ss.SSS Z' } = options;
const { datePattern = 'YYYY-MM-DD HH:mm:ss.SSS Z', depth = Infinity } = options;
return function (args, {

@@ -20,5 +20,5 @@ logger,

timestamp = timestamp && datePattern ? `[${formatDate(new Date(timestamp), datePattern)}] ` : '';
args = args.map(arg => isObject(arg) ? inspect(arg, { depth: Infinity }) : format(arg)).join(' ');
args = args.map(arg => isObject(arg) ? inspect(arg, { depth }) : format(arg)).join(' ');
return `${timestamp}[${level}] ${logger} - ${args}`;
};
};
{
"name": "clrsole",
"version": "1.0.1",
"version": "1.0.2",
"description": "colorful console.log",

@@ -33,3 +33,3 @@ "main": "index.js",

"dependencies": {
"celia": "^5.1.2",
"celia": "^5.1.3",
"chalk": "^2.4.2",

@@ -36,0 +36,0 @@ "kick-date": "^1.0.2"

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc