lib/cli/out.js
function handleOutput(destConfig, jsonString) {
	var type = destConfig.type,
		destPath = destConfig.path,
		defaultFileName = destConfig.defaultFileName,
		force = destConfig.force,
		pretty = destConfig.pretty;

	if (!type || type === "omit") {
		// don't even bother
		return;
	}
	if (pretty) {
		jsonString = prettyData.pd.json(jsonString);
	}

	switch (type) {
		case IOType.FILE:
			writeFile(jsonString, destPath, defaultFileName, force);
			break;
		case IOType.STDOUT:
			stdout(jsonString);
			break;
	}
}
function handleOutput(destConfig, jsonString) {
	var type = destConfig.type,
		destPath = destConfig.path,
		defaultFileName = destConfig.defaultFileName,
		force = destConfig.force,
		pretty = destConfig.pretty;

	if (!type || type === "omit") {
		// don't even bother
		return;
	}
	if (pretty) {
		jsonString = prettyData.pd.json(jsonString);
	}

	switch (type) {
		case IOType.FILE:
			writeFile(jsonString, destPath, defaultFileName, force);
			break;
		case IOType.STDOUT:
			stdout(jsonString);
			break;
	}
}
function handleOutput ( destConfig , jsonString ) { var type = destConfig . type , destPath = destConfig . path , defaultFileName = destConfig . defaultFileName , force = destConfig . force , pretty = destConfig . pretty ; if ( ! type || type === "omit" ) { // don't even bother return ; } if ( pretty ) { jsonString = prettyData . pd . json ( jsonString ) ; } switch ( type ) { case IOType . FILE : writeFile ( jsonString , destPath , defaultFileName , force ) ; break ; case IOType . STDOUT : stdout ( jsonString ) ; break ; } }
Save output to a certain location
@param {Object} destConfig
@param {String} jsonString
Save output to a certain location