code: function encodePubModes(modes) {
  	var string = "";
  	if(modes.raw) {
  		string = string + modeValues.RAW;
  	};
  	if(modes.merge) {
  		string = string + modeValues.MERGE;
  	};
  	if(modes.distinct) {
  		string = string + modeValues.DISTINCT;
  	};
  	if(modes.command) {
  		string = string + modeValues.COMMAND;
  	};
  	if (!string) {
  		throw new Error("No modes are specified");
  	}
  	return string;
  }
docs: Encodes a publish mode associative array in a ARI protocol string form.
  eg. {raw: true, merge: true, distinct: false, command: false} = "R|M".
  
  @param {Array} modes publish mode flags
  @return {String} pipe-delimited string
  @private