Comparing version 0.0.8 to 0.0.9
{ | ||
"name": "debux", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Easy-to-use library for debugging your code", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -39,4 +39,4 @@ import chalk from "chalk"; | ||
} | ||
public log(s: string, options?: Options): void { | ||
this.addCache(s); | ||
public log(s: string | null, options?: Options): void { | ||
this.addCache(s ?? "null"); | ||
if (this.logLevel == level.all) return Debux.consoleLog(this.constructMessage(s, options)); | ||
@@ -71,3 +71,3 @@ } | ||
private constructMessage(s: string, options?: Options): string { | ||
private constructMessage(s: string | null, options?: Options): string { | ||
let msg: string = chalk.cyan(new Date().toUTCString()) + seperator; | ||
@@ -77,5 +77,6 @@ if (typeof options?.process == "string") msg += chalk.magenta(options.process) + seperator; | ||
if (typeof options?.event == "string") msg += chalk.green(options.event) + seperator; | ||
if (typeof options?.function == "string") msg += chalk.blue(options.function) + seperator; | ||
if (typeof options?.function == "string") | ||
msg += chalk.blue(options.function) + s ? seperator : ""; | ||
return msg + s; | ||
return msg + (s ? s : ""); | ||
} | ||
@@ -82,0 +83,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11793
255