@b613/utils
Advanced tools
Comparing version 1.0.0-beta21 to 1.0.0-beta22
export declare class Trace { | ||
constructor(name: string); | ||
readonly prefix: string; | ||
constructor(prefix: string); | ||
info(msg: string, prefix?: string): void; | ||
@@ -4,0 +6,0 @@ warn(msg: string, prefix?: string): void; |
/* eslint-disable no-console */ | ||
export class Trace { | ||
constructor(name) { | ||
this.name = name; | ||
} | ||
parse(type, msg) { | ||
const timestamp = new Date().toISOString(); | ||
return `${timestamp} ${this.name} ${type} - ${msg}`; | ||
} | ||
import { AbstractTrace } from './AbstractTrace'; | ||
export class Trace extends AbstractTrace { | ||
info(msg, prefix = 'INFO') { | ||
@@ -11,0 +5,0 @@ console.info(this.parse(prefix, msg)); |
@@ -6,10 +6,4 @@ "use strict"; | ||
const color_node_1 = tslib_1.__importDefault(require("../color/color.node")); | ||
class Trace { | ||
constructor(name) { | ||
this.name = name; | ||
} | ||
parse(type, msg) { | ||
const timestamp = new Date().toISOString(); | ||
return `${timestamp} ${this.name} ${type} - ${msg}\n`; | ||
} | ||
const AbstractTrace_1 = require("./AbstractTrace"); | ||
class Trace extends AbstractTrace_1.AbstractTrace { | ||
info(msg, prefix = 'INFO') { | ||
@@ -16,0 +10,0 @@ process.stdout.write(this.parse(prefix, msg)); |
{ | ||
"name": "@b613/utils", | ||
"version": "1.0.0-beta21", | ||
"version": "1.0.0-beta22", | ||
"description": "Set of utility methods for common operations", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
122797
63
2053