packages/ddp-server/crossbar.js
function (msg) {
    var self = this;
    if (! _.has(msg, 'collection')) {
      return '';
    } else if (typeof(msg.collection) === 'string') {
      if (msg.collection === '')
        throw Error("Message has empty collection!");
      return msg.collection;
    } else {
      throw Error("Message has non-string collection!");
    }
  }
function (msg) {
    var self = this;
    if (! _.has(msg, 'collection')) {
      return '';
    } else if (typeof(msg.collection) === 'string') {
      if (msg.collection === '')
        throw Error("Message has empty collection!");
      return msg.collection;
    } else {
      throw Error("Message has non-string collection!");
    }
  }
function ( msg ) { var self = this ; if ( ! _ . has ( msg , 'collection' ) ) { return '' ; } else if ( typeof ( msg . collection ) === 'string' ) { if ( msg . collection === '' ) throw Error ( "Message has empty collection!" ) ; return msg . collection ; } else { throw Error ( "Message has non-string collection!" ) ; } }
msg is a trigger or a notification
msg is a trigger or a notification