Comparing version 0.2.2 to 0.2.3
25
index.js
@@ -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 @@ |
{ | ||
"name": "depugger", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "small debugging utility", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9814
162