mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-06-29 06:20:25 -04:00
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:
parent
471b53de8f
commit
1dec8ccffd
30 changed files with 1130 additions and 1074 deletions
src
21
src/debug.js
21
src/debug.js
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue