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

debux

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

debux - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

2

package.json
{
"name": "debux",
"version": "0.3.2",
"version": "0.3.3",
"description": "Easy-to-use library for debugging your code",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -48,3 +48,3 @@ import chalk from "chalk";

public log(s: string | null, options?: Options): void {
this.addCache(s ?? "null");
this.addCache(this.constructEntry(s, "log", options));
if (this.logLevel == level.all)

@@ -55,3 +55,3 @@ return Debux.consoleLog(this.constructMessage(s, "log", options));

public error(s: string, options?: Options): void {
this.addCache(s);
this.addCache(this.constructEntry(s, "error", options));
if (this.logLevel >= level.error)

@@ -62,3 +62,3 @@ return Debux.consoleLog(this.constructMessage(chalk.red(s), "error", options));

public warn(s: string, options?: Options): void {
this.addCache(s);
this.addCache(this.constructEntry(s, "warn", options));
if (this.logLevel >= level.warning)

@@ -69,3 +69,3 @@ return Debux.consoleLog(this.constructMessage(chalk.yellow(s), "warn", options));

public info(s: string, options?: Options): void {
this.addCache(s);
this.addCache(this.constructEntry(s, "info", options));
if (this.logLevel >= level.info)

@@ -94,2 +94,13 @@ return Debux.consoleLog(this.constructMessage(s, "info", options));

private constructEntry(s: string | null, cmd: cmd, options?: Options): string {
let msg: string =
new Date().toUTCString() + seperator + this.getCMDString(cmd);
if (typeof options?.process == "string") msg += options.process + seperator;
if (typeof options?.class == "string") msg += options.class + seperator;
if (typeof options?.event == "string") msg += options.event + seperator;
if (typeof options?.function == "string") msg += options.function + seperator;
if (!s) return msg.slice(0, msg.length - 3);
else return msg + s;
}
private getCMDString(cmd: cmd): string {

@@ -96,0 +107,0 @@ switch (cmd) {

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