lib/commandCenter/commandCenter.js
function serializeCommandResult(result) {
	const out = [];

	out.push(result.errorCode || 'null');
	out.push(result.response || 'null');

	if (result.myEvents && result.myEvents.length) {
		out.push('[' + result.myEvents.join(',') + ']');
	}

	return '[' + out.join(',') + ']';
}
function serializeCommandResult(result) {
	const out = [];

	out.push(result.errorCode || 'null');
	out.push(result.response || 'null');

	if (result.myEvents && result.myEvents.length) {
		out.push('[' + result.myEvents.join(',') + ']');
	}

	return '[' + out.join(',') + ']';
}
function serializeCommandResult ( result ) { const out = [ ] ; out . push ( result . errorCode || 'null' ) ; out . push ( result . response || 'null' ) ; if ( result . myEvents && result . myEvents . length ) { out . push ( '[' + result . myEvents . join ( ',' ) + ']' ) ; } return '[' + out . join ( ',' ) + ']' ; }
Serializes a single command response into a string.

@param {Object} result              The result of the user command, including pre-serialized arguments
@param {string} [result.errorCode]  JSON serialized error code
@param {string} [result.response]   JSON serialized response value
@param {string[]} [result.myEvents] Array of JSON serialized events for the executing user
@returns {string}                   The serialized response.
Serializes a single command response into a string .