+10
-15
@@ -12,8 +12,7 @@ var util = require('util'); | ||
| * @param pName context name for debugging messages | ||
| * @param pOptions options hash | ||
| * @return {Function} | ||
| */ | ||
| function depugger(pDebug, pName, pOptions) { | ||
| var debug, name, options, backend; | ||
| function depugger(pDebug, pName) { | ||
| var debug, name, backend; | ||
@@ -32,17 +31,13 @@ if (typeof pDebug === 'object') { | ||
| var logFunction = noop; | ||
| var logFunction = function() { | ||
| var args = Array.prototype.splice.call(arguments, 0); | ||
| var message = util.format.apply(null, args); | ||
| if(debug) { | ||
| logFunction = function() { | ||
| if (!debug) { | ||
| return; | ||
| } | ||
| message = prefix + message; | ||
| var args = Array.prototype.splice.call(arguments, 0); | ||
| var message = util.format.apply(null, args); | ||
| backend.write(message); | ||
| }; | ||
| message = prefix + message; | ||
| backend.write(message); | ||
| }; | ||
| if(!debug) { | ||
| logFunction = noop; | ||
| } | ||
@@ -49,0 +44,0 @@ |
+1
-1
| { | ||
| "name": "depugger", | ||
| "version": "0.2.2", | ||
| "version": "0.2.3", | ||
| "description": "small debugging utility", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
9814
-1.41%162
-2.41%