lib/events.js
function publish(subject, op, target) {
  try {
    var type = (_.isString(target)) ? target : target.type;
    var topic = getTopic(type);
    // optimization: would be nice to tell if there are subscribers before I bother to create
    var event = new Event(subject, op, target);
    provider.publish(topic, event);
  }
  catch (err) {
    logger.error('unable to publish event', err);
  }
}
function publish(subject, op, target) {
  try {
    var type = (_.isString(target)) ? target : target.type;
    var topic = getTopic(type);
    // optimization: would be nice to tell if there are subscribers before I bother to create
    var event = new Event(subject, op, target);
    provider.publish(topic, event);
  }
  catch (err) {
    logger.error('unable to publish event', err);
  }
}
publishing is async