src/courier/PostMessageMapper.js
function toEvent(message) {
            if (message) {
                if (message.error) {
                    PostMessageUtilities.log("Error on message: " + message.error, "ERROR", "PostMessageMapper");
                    return function() {
                        return message;
                    };
                }
                else {
                    return _getMappedMethod.call(this, message);
                }
            }
        }
function toEvent(message) {
            if (message) {
                if (message.error) {
                    PostMessageUtilities.log("Error on message: " + message.error, "ERROR", "PostMessageMapper");
                    return function() {
                        return message;
                    };
                }
                else {
                    return _getMappedMethod.call(this, message);
                }
            }
        }
function toEvent ( message ) { if ( message ) { if ( message . error ) { PostMessageUtilities . log ( "Error on message: " + message . error , "ERROR" , "PostMessageMapper" ) ; return function ( ) { return message ; } ; } else { return _getMappedMethod . call ( this , message ) ; } } }
Method mapping the message to the correct event on the event channel and invoking it
@param {Object} message - the message to be mapped
@returns {Function} the handler function to invoke on the event channel
Method mapping the message to the correct event on the event channel and invoking it