2 Commits

Author SHA1 Message Date
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
4 changed files with 8 additions and 5 deletions

5
dist/index.d.ts vendored
View File

@@ -4,7 +4,10 @@ export declare class SmartDebug {
/** /**
* enables debugging output * enables debugging output
*/ */
enableDebugging(debugLogFunction?: any): void; enableDebugging(debugLogFunction?: {
(message?: any, ...optionalParams: any[]): void;
(message?: any, ...optionalParams: any[]): void;
}): void;
/** /**
* logs a message based on the contraints of the SmartDebug instance * logs a message based on the contraints of the SmartDebug instance
*/ */

4
dist/index.js vendored
View File

@@ -8,7 +8,7 @@ class SmartDebug {
/** /**
* enables debugging output * enables debugging output
*/ */
enableDebugging(debugLogFunction = null) { enableDebugging(debugLogFunction = console.log) {
this.debugEnabled = true; this.debugEnabled = true;
this.debugLogFunction = debugLogFunction; this.debugLogFunction = debugLogFunction;
} }
@@ -25,4 +25,4 @@ class SmartDebug {
} }
} }
exports.SmartDebug = SmartDebug; exports.SmartDebug = SmartDebug;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVBO0lBQUE7UUFDRSxxQkFBZ0IsR0FBUSxJQUFJLENBQUE7UUFDcEIsaUJBQVksR0FBWSxLQUFLLENBQUE7SUFxQnZDLENBQUM7SUFuQkM7O09BRUc7SUFDSCxlQUFlLENBQUUsZ0JBQWdCLEdBQUcsSUFBSTtRQUN0QyxJQUFJLENBQUMsWUFBWSxHQUFHLElBQUksQ0FBQTtRQUN4QixJQUFJLENBQUMsZ0JBQWdCLEdBQUcsZ0JBQWdCLENBQUE7SUFDMUMsQ0FBQztJQUVEOztPQUVHO0lBQ0gsR0FBRyxDQUFFLFNBQWM7UUFDakIsRUFBRSxDQUFDLENBQUMsSUF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MsQ0FBQztZQUM3QixPQUFPLENBQUMsR0FBRyxDQUFDLFNBQVMsQ0FBQyxDQUFBO1FBQ3hCLENBQUM7SUFDSCxDQUFDO0NBRUY7QUF2QkQsZ0NBdUJDIn0=

View File

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

View File

@@ -7,7 +7,7 @@ export class SmartDebug {
/** /**
* enables debugging output * enables debugging output
*/ */
enableDebugging (debugLogFunction = null) { enableDebugging (debugLogFunction = console.log) {
this.debugEnabled = true this.debugEnabled = true
this.debugLogFunction = debugLogFunction this.debugLogFunction = debugLogFunction
} }