diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/command/commands.js | 15 | 
1 files changed, 13 insertions, 2 deletions
| diff --git a/src/command/commands.js b/src/command/commands.js index 0855e3a..d27fa58 100644 --- a/src/command/commands.js +++ b/src/command/commands.js @@ -26,8 +26,19 @@ function exec(output, args) {  	try {  		var result = eval(args.join(' ')); -		if ( typeof result !== 'undefined' ) { -			output.log(result); +		switch ( typeof result ) { +			case 'string': { +				output.log(result); +				break; +			} +			case 'number': { +				output.log(result); +				break; +			} +			case 'object': { +				output.log(JSON.stringify(result)); +				break; +			}  		}  	} catch (exception) {  		output.error(exception); | 
