Comparing version 0.1.2 to 0.1.3
@@ -5,4 +5,12 @@ var depugger = require('../'); | ||
debug('foo'); | ||
debug('bar "%s"', 'bax'); | ||
debug('spam %d eggs', 10); | ||
debug('foo'); //output: [fooDebugger] foo | ||
debug('bar "%s"', 'bax'); //output: [fooDebugger] bar "bax" | ||
debug('spam %d eggs', 10); //output: [fooDebugger] spam 10 eggs | ||
depugger(true, 'fooDebugger')('foo'); //output: [fooDebugger] foo | ||
depugger(true)('foo'); //output: foo | ||
depugger(false)('hello, i will not be logged!'); //output: - | ||
depugger(false, 'barDebugger')('hello, i will not be logged, too!'); //output: - |
@@ -26,2 +26,4 @@ var util = require('util'); | ||
var prefix = name ? util.format('[%s] ', name) : ''; | ||
return function() { | ||
@@ -35,5 +37,3 @@ if(!debug) { | ||
if(name) { | ||
message = util.format('[%s] %s', name, message); | ||
} | ||
message = prefix + message; | ||
@@ -40,0 +40,0 @@ backend.write(message); |
{ | ||
"name": "depugger", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "small debugging utility", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,0 +0,0 @@ # node-depugger |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ var expect = require('chai').expect; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
8702
147