fix indentation and a few other stuff webstorm felt like fixing (for example if (condition) -> if(condition) since that was the more frequent style in node-minecraft-protocol)

This commit is contained in:
Romain Beaumont 2015-05-14 22:08:49 +02:00
parent 471b53de8f
commit 1dec8ccffd
30 changed files with 1130 additions and 1074 deletions

View file

@ -1,17 +1,18 @@
var util = require('util')
var debug;
if (process.env.NODE_DEBUG && /(minecraft-protocol|mc-proto)/.test(process.env.NODE_DEBUG)) {
var pid = process.pid;
debug = function(x) {
// if console is not set up yet, then skip this.
if (!console.error)
return;
console.error('MC-PROTO: %d', pid,
util.format.apply(util, arguments).slice(0, 500));
};
if(process.env.NODE_DEBUG && /(minecraft-protocol|mc-proto)/.test(process.env.NODE_DEBUG)) {
var pid = process.pid;
debug = function(x) {
// if console is not set up yet, then skip this.
if(!console.error)
return;
console.error('MC-PROTO: %d', pid,
util.format.apply(util, arguments).slice(0, 500));
};
} else {
debug = function() { };
debug = function() {
};
}
module.exports = debug;