@b613/utils
Advanced tools
Comparing version 1.0.0-beta22 to 1.0.0-beta23
/* eslint-disable no-console */ | ||
import { AbstractTrace } from './AbstractTrace'; | ||
export class Trace extends AbstractTrace { | ||
export class Trace { | ||
constructor(prefix) { | ||
this.prefix = prefix; | ||
} | ||
parse(type, msg) { | ||
const timestamp = new Date().toISOString(); | ||
return `${timestamp} ${this.prefix} ${type} - ${msg}\n`; | ||
} | ||
info(msg, prefix = 'INFO') { | ||
@@ -5,0 +11,0 @@ console.info(this.parse(prefix, msg)); |
@@ -6,4 +6,10 @@ "use strict"; | ||
const color_node_1 = tslib_1.__importDefault(require("../color/color.node")); | ||
const AbstractTrace_1 = require("./AbstractTrace"); | ||
class Trace extends AbstractTrace_1.AbstractTrace { | ||
class Trace { | ||
constructor(prefix) { | ||
this.prefix = prefix; | ||
} | ||
parse(type, msg) { | ||
const timestamp = new Date().toISOString(); | ||
return `${timestamp} ${this.prefix} ${type} - ${msg}\n`; | ||
} | ||
info(msg, prefix = 'INFO') { | ||
@@ -10,0 +16,0 @@ process.stdout.write(this.parse(prefix, msg)); |
{ | ||
"name": "@b613/utils", | ||
"version": "1.0.0-beta22", | ||
"version": "1.0.0-beta23", | ||
"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
2056
122774
61