9 Commits

Author SHA1 Message Date
5f0a7ceaa3 2.0.7 2017-09-19 17:59:01 +02:00
b65a94b86c update 2017-09-19 17:58:59 +02:00
0248a23e7d 2.0.6 2017-09-19 17:48:58 +02:00
068c19704b use console.log as default 2017-09-19 17:48:56 +02:00
a8b760165d 2.0.5 2017-09-18 19:11:37 +02:00
b65c012779 fi ci 2017-09-18 19:11:34 +02:00
657f07120c 2.0.4 2017-09-18 19:10:29 +02:00
919a23cd09 test yml behaviour 2017-09-18 19:10:21 +02:00
d5a4a0f4ee 2.0.3 2017-09-18 18:22:50 +02:00
4 changed files with 7 additions and 17 deletions

3
dist/index.d.ts vendored
View File

@@ -1,10 +1,9 @@
export declare class SmartDebug {
debugLogFunction: any;
private debugEnabled;
/**
* enables debugging output
*/
enableDebugging(debugLogFunction?: any): void;
enableDebugging(): void;
/**
* logs a message based on the contraints of the SmartDebug instance
*/

11
dist/index.js vendored
View File

@@ -2,27 +2,22 @@
Object.defineProperty(exports, "__esModule", { value: true });
class SmartDebug {
constructor() {
this.debugLogFunction = null;
this.debugEnabled = false;
}
/**
* enables debugging output
*/
enableDebugging(debugLogFunction = null) {
enableDebugging() {
this.debugEnabled = true;
this.debugLogFunction = debugLogFunction;
}
/**
* logs a message based on the contraints of the SmartDebug instance
*/
log(logObject) {
if (this.debugEnabled && this.debugLogFunction) {
this.debugLogFunction(logObject);
}
else if (this.debugEnabled) {
if (this.debugEnabled) {
console.log(logObject);
}
}
}
exports.SmartDebug = SmartDebug;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVBO0lBQUE7UUFDRSxxQkFBZ0IsR0FBUSxJQUFJLENBQUE7UUFDcEIsaUJBQVksR0FBWSxLQUFLLENBQUE7SUFxQnZDLENBQUM7SUFuQkM7O09BRUc7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CxDQUFDO0NBRUY7QUFuQkQsZ0NBbUJDIn0=

View File

@@ -1,6 +1,6 @@
{
"name": "smartdebug",
"version": "2.0.2",
"version": "2.0.7",
"description": "debug the smart way",
"main": "dist/index.js",
"typings": "dist/index.d.ts",

View File

@@ -1,24 +1,20 @@
import * as plugins from './smartdebug.plugins'
export class SmartDebug {
debugLogFunction: any = null
private debugEnabled: boolean = false
/**
* enables debugging output
*/
enableDebugging (debugLogFunction = null) {
enableDebugging () {
this.debugEnabled = true
this.debugLogFunction = debugLogFunction
}
/**
* logs a message based on the contraints of the SmartDebug instance
*/
log (logObject: any) {
if (this.debugEnabled && this.debugLogFunction) {
this.debugLogFunction(logObject)
} else if (this.debugEnabled) {
if (this.debugEnabled) {
console.log(logObject)
}
}