upgrade to latest standards

This commit is contained in:
2018-04-12 18:02:48 +02:00
parent 5f0a7ceaa3
commit d295b2e070
13 changed files with 177 additions and 89 deletions

View File

@ -1,22 +1,39 @@
import * as plugins from './smartdebug.plugins'
import * as plugins from './smartdebug.plugins';
export class SmartDebug {
private debugEnabled: boolean = false
private _debugEnabled: boolean = false;
get debugEnabled () {
return this._debugEnabled;
}
/**
* enables debugging output
*/
enableDebugging () {
this.debugEnabled = true
public enableDebugging() {
this._debugEnabled = true;
}
/**
* disables debugging
*/
public disableDebugging() {
this._debugEnabled = false;
}
/**
* logs a message based on the contraints of the SmartDebug instance
*/
log (logObject: any) {
if (this.debugEnabled) {
console.log(logObject)
public log(logObject: any) {
if (this._debugEnabled) {
// tslint:disable-next-line:no-console
console.log(logObject);
}
}
/**
* a function returning
*/
public isDebugMode() {
return this._debugEnabled;
}
}

View File

@ -1 +1 @@
import 'typings-global'
export {};