lib/eventstore.js
function (query, callback) {
    if (!callback) {
      callback = query;
      query = null;
    }

    if (typeof query === 'string') {
      query = { aggregateId: query };
    }

    var self = this;

    this.store.getLastEvent(query, function (err, evt) {
      if (err) return callback(err);

      callback(null, new EventStream(self, query, evt ? [evt] : []));
    });
  }
function (query, callback) {
    if (!callback) {
      callback = query;
      query = null;
    }

    if (typeof query === 'string') {
      query = { aggregateId: query };
    }

    var self = this;

    this.store.getLastEvent(query, function (err, evt) {
      if (err) return callback(err);

      callback(null, new EventStream(self, query, evt ? [evt] : []));
    });
  }
function ( query , callback ) { if ( ! callback ) { callback = query ; query = null ; } if ( typeof query === 'string' ) { query = { aggregateId : query } ; } var self = this ; this . store . getLastEvent ( query , function ( err , evt ) { if ( err ) return callback ( err ) ; callback ( null , new EventStream ( self , query , evt ? [ evt ] : [ ] ) ) ; } ) ; }
loads the last event in a stream
@param {Object || String} query    the query object [optional]
@param {Function}         callback the function that will be called when this action has finished
`function(err, eventstream){}`
loads the last event in a stream