lib/memory-engine.js
function findOne(query, options, callback) {
    if (typeof options === 'function') {
      callback = options
      options = {}
    }
    self.emit('findOne', query, options)
    findByQuery(query, options, function (error, objects) {
      self.emit('received', objects[0])
      callback(undefined, objects[0])
    })
  }
function findOne(query, options, callback) {
    if (typeof options === 'function') {
      callback = options
      options = {}
    }
    self.emit('findOne', query, options)
    findByQuery(query, options, function (error, objects) {
      self.emit('received', objects[0])
      callback(undefined, objects[0])
    })
  }
function findOne ( query , options , callback ) { if ( typeof options === 'function' ) { callback = options options = { } } self . emit ( 'findOne' , query , options ) findByQuery ( query , options , function ( error , objects ) { self . emit ( 'received' , objects [ 0 ] ) callback ( undefined , objects [ 0 ] ) } ) }
Performs a find on the data and limits the result set to 1.
Emits a 'findOne' event.

@param {Object} query to search by
@param {Object} options
@param {Function} callback
@api public
Performs a find on the data and limits the result set to 1 . Emits a findOne event .