smartdebug/ts/index.ts
Philipp Kunz e6277a8c13 initial
2015-11-15 20:35:13 +01:00

18 lines
416 B
TypeScript

/// <reference path="typings/tsd.d.ts" />
var beautylog = require("beautylog");
var colors = require("colors");
var debugActive:boolean = false;
var debugsmart = {
log: function(message:string){
if (debugActive) {
beautylog.log("Debug:".zebra + ' ' + message);
}
},
activate: function(debugArg:boolean){
debugActive = debugArg;
}
};
module.exports = debugsmart;