lib/plugin.js
function (query, update, fship) {
    var options = { new: false };

    return function (done) {
      this.findOneAndUpdate(query, update, options, function (err, res) {
        done(err, fship);
      });
    }
  }
function (query, update, fship) {
    var options = { new: false };

    return function (done) {
      this.findOneAndUpdate(query, update, options, function (err, res) {
        done(err, fship);
      });
    }
  }
function ( query , update , fship ) { var options = { new : false } ; return function ( done ) { this . findOneAndUpdate ( query , update , options , function ( err , res ) { done ( err , fship ) ; } ) ; } }
The work function which pushes or updates embedded friend objects
for two documents, returns a function

@api private
The work function which pushes or updates embedded friend objects for two documents returns a function