add smartdebug.run() function

This commit is contained in:
Philipp Kunz 2015-11-28 22:43:57 +01:00
parent c87172ff1f
commit 304f3801bd
2 changed files with 10 additions and 0 deletions

View File

@ -8,6 +8,11 @@ var smartDebug = {
beautylog.log("###DEBUG:###".rainbow + ' ' + message);
}
},
run: function (functionArg) {
if (debugActive) {
functionArg();
}
},
activate: function (debugArg) {
debugActive = debugArg;
},

View File

@ -9,6 +9,11 @@ var smartDebug = {
beautylog.log("###DEBUG:###".rainbow + ' ' + message);
}
},
run: function(functionArg) {
if (debugActive) {
functionArg();
}
}
activate: function(debugArg:boolean){
debugActive = debugArg;
},