src/utils/formatter.js
/**
	 * Display the output based on given arguments
	 *
	 * @param {Array} results Result to display
	 * @param {object} args Arguments to show the output
	 */
Display the output based on given arguments
@param {Array} results Result to display
@param {object} args Arguments to show the output
Display the output based on given arguments @param { Array } results Result to display @param { object } args Arguments to show the output
static output(results, args) {
		const { fields, format, separator } = args;
		switch (format) {
			case 'json':
				formatter.toJson(results);
				break;
			case 'string':
				formatter.toString(results, separator);
				break;
			case 'list':
				formatter.toList(fields, results);
				break;
			case 'table':
			default:
				formatter.toTable(fields, results);
				break;
		}
	}
static output ( results , args ) { const { fields , format , separator } = args ; switch ( format ) { case 'json' : formatter . toJson ( results ) ; break ; case 'string' : formatter . toString ( results , separator ) ; break ; case 'list' : formatter . toList ( fields , results ) ; break ; case 'table' : default : formatter . toTable ( fields , results ) ; break ; } }
Display the output based on given arguments
 @param {Array} results Result to display
 @param {object} args Arguments to show the output
Display the output based on given arguments @param { Array } results Result to display @param { object } args Arguments to show the output