Convert tabs to spaces

This commit is contained in:
mmorrison 2017-08-09 05:32:09 -05:00
parent 0dd25bfcda
commit 3674d384d0
39 changed files with 2414 additions and 2414 deletions

View file

@ -11,27 +11,27 @@ delete argv.output;
const options = {};
for(const key of Object.keys(argv)) {
const value = argv[key];
if(
key === '_'
|| key.charAt(0) === '$'
|| (typeof value !== 'string' && typeof value !== 'number')
)
continue;
options[key] = value;
if(
key === '_'
|| key.charAt(0) === '$'
|| (typeof value !== 'string' && typeof value !== 'number')
)
continue;
options[key] = value;
}
if(debug) Gamedig.debug = true;
Gamedig.isCommandLine = true;
Gamedig.query(options)
.then((state) => {
if(outputFormat === 'pretty') {
console.log(JSON.stringify(state,null,' '));
} else {
console.log(JSON.stringify(state));
}
})
.catch((error) => {
.then((state) => {
if(outputFormat === 'pretty') {
console.log(JSON.stringify(state,null,' '));
} else {
console.log(JSON.stringify(state));
}
})
.catch((error) => {
if (debug) {
if (error instanceof Error) {
console.log(error.stack);
@ -48,4 +48,4 @@ Gamedig.query(options)
console.log(JSON.stringify({error: error}));
}
}
});
});