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

@4lch4/logger

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@4lch4/logger - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

dist/index.d.ts

@@ -5,3 +5,3 @@ import { ILogger, ILoggerOpts } from './interfaces';

private ioUtil?;
constructor(loggerOpts: ILoggerOpts);
constructor(loggerOpts?: ILoggerOpts);
info(msg: string): void;

@@ -8,0 +8,0 @@ warn(msg: string): void;

@@ -11,7 +11,7 @@ "use strict";

let formatOpt = lib_1.DefaultLogFormat;
if (loggerOpts.format)
if (loggerOpts === null || loggerOpts === void 0 ? void 0 : loggerOpts.format)
formatOpt = loggerOpts.format;
if (loggerOpts.colorOpts)
if (loggerOpts === null || loggerOpts === void 0 ? void 0 : loggerOpts.colorOpts)
colorOpts = loggerOpts.colorOpts;
if (loggerOpts.logDir) {
if (loggerOpts === null || loggerOpts === void 0 ? void 0 : loggerOpts.logDir) {
this.ioUtil = new IOUtil_1.IOUtil(loggerOpts.logDir, loggerOpts.format);

@@ -18,0 +18,0 @@ }

{
"name": "@4lch4/logger",
"displayName": "Logger",
"version": "1.1.0",
"version": "1.1.1",
"description": "A small utility for logging to console within NodeJS/TypeScript applications.",

@@ -6,0 +6,0 @@ "main": "dist/index.js",

@@ -9,9 +9,9 @@ import { ILogger, ILoggerOpts, Level } from './interfaces'

constructor(loggerOpts: ILoggerOpts) {
constructor(loggerOpts?: ILoggerOpts) {
let colorOpts = DefaultColors
let formatOpt = DefaultLogFormat
if (loggerOpts.format) formatOpt = loggerOpts.format
if (loggerOpts.colorOpts) colorOpts = loggerOpts.colorOpts
if (loggerOpts.logDir) {
if (loggerOpts?.format) formatOpt = loggerOpts.format
if (loggerOpts?.colorOpts) colorOpts = loggerOpts.colorOpts
if (loggerOpts?.logDir) {
this.ioUtil = new IOUtil(loggerOpts.logDir, loggerOpts.format)

@@ -18,0 +18,0 @@ }

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