_getMessageValue(messageObj) {

    // Extract the raw message
    var data = messageObj.data;

    // Split the message in to its parts
    var msgParts = data.split('::');

    // Return if the message is of the passed in type
    if (msgParts.length === 2) {

      // Try to parse the value of the message in case a number or boolean was
      // returned from the API
      try {
        return JSON.parse(msgParts[1]);
      } catch (error) {

        // Otherwise return the value as is without manipulation
        return msgParts[1];
      }
    }

    return null;
  }
/**
   * Extracts the value from a message object if there is one to extract. Will
   * return null if no value exists, or a valid value can not be extracted.
   *
   * @param {object} messageObj A message object from the message channel
   * @returns {*} Returns the value in the message object or null or a value
   *              does not exist or cannot be extracted.
   *
   * @private
   */
Extracts the value from a message object if there is one to extract. Will
return null if no value exists, or a valid value can not be extracted.

@param {object} messageObj A message object from the message channel
@returns {*} Returns the value in the message object or null or a value
does not exist or cannot be extracted.

@private
Extracts the value from a message object if there is one to extract . Will return null if no value exists or a valid value can not be extracted . @param { object } messageObj A message object from the message channel @returns { * } Returns the value in the message object or null or a value does not exist or cannot be extracted . @private
_getMessageValue(messageObj) {
    var data = messageObj.data;
    var msgParts = data.split('::');
    if (msgParts.length === 2) {
      try {
        return JSON.parse(msgParts[1]);
      } catch (error) {
        return msgParts[1];
      }
    }
    return null;
  }
_getMessageValue ( messageObj ) { var data = messageObj . data ; var msgParts = data . split ( '::' ) ; if ( msgParts . length === 2 ) { try { return JSON . parse ( msgParts [ 1 ] ) ; } catch ( error ) { return msgParts [ 1 ] ; } } return null ; }
Extracts the value from a message object if there is one to extract.
Extracts the value from a message object if there is one to extract .
// Extract the raw message // Split the message in to its parts // Return if the message is of the passed in type // Try to parse the value of the message in case a number or boolean was // returned from the API // Otherwise return the value as is without manipulation