lib/deploy.js
function handleMQTDeployment(trigger, name, namespace, options) {
  let mqTrigger = trigger;
  // If only a string is passed, expect it to be the subject
  if (typeof mqTrigger === 'string') {
    // Defaults to Kafka
    mqTrigger = {
      queue: 'kafka',
      topic: mqTrigger,
    };
  } else {
    // Otherwise expect type and subject to be set
    if (_.isEmpty(mqTrigger.queue)) {
      throw new Error('You should specify a queue for the trigger event (i.e. kafka, nats)');
    }
    if (_.isEmpty(mqTrigger.topic)) {
      throw new Error('You should specify a topic for the trigger event');
    }
  }

  return deployMQTrigger(
    MQTypes[mqTrigger.queue.toLowerCase()],
    name,
    namespace,
    mqTrigger.topic,
    { log: options.log }
  );
}
function handleMQTDeployment(trigger, name, namespace, options) {
  let mqTrigger = trigger;
  // If only a string is passed, expect it to be the subject
  if (typeof mqTrigger === 'string') {
    // Defaults to Kafka
    mqTrigger = {
      queue: 'kafka',
      topic: mqTrigger,
    };
  } else {
    // Otherwise expect type and subject to be set
    if (_.isEmpty(mqTrigger.queue)) {
      throw new Error('You should specify a queue for the trigger event (i.e. kafka, nats)');
    }
    if (_.isEmpty(mqTrigger.topic)) {
      throw new Error('You should specify a topic for the trigger event');
    }
  }

  return deployMQTrigger(
    MQTypes[mqTrigger.queue.toLowerCase()],
    name,
    namespace,
    mqTrigger.topic,
    { log: options.log }
  );
}
function handleMQTDeployment ( trigger , name , namespace , options ) { let mqTrigger = trigger ; // If only a string is passed, expect it to be the subject if ( typeof mqTrigger === 'string' ) { // Defaults to Kafka mqTrigger = { queue : 'kafka' , topic : mqTrigger , } ; } else { // Otherwise expect type and subject to be set if ( _ . isEmpty ( mqTrigger . queue ) ) { throw new Error ( 'You should specify a queue for the trigger event (i.e. kafka, nats)' ) ; } if ( _ . isEmpty ( mqTrigger . topic ) ) { throw new Error ( 'You should specify a topic for the trigger event' ) ; } } return deployMQTrigger ( MQTypes [ mqTrigger . queue . toLowerCase ( ) ] , name , namespace , mqTrigger . topic , { log : options . log } ) ; }
Handle message queue trigger input to normalize the users input values.

@param {string|object} trigger
@param {string} name
@param {string} namespace
@param {object} options
Handle message queue trigger input to normalize the users input values .