lib/operations/collection_ops.js
function findOneAndDelete(coll, filter, options, callback) {
  // Final options
  const finalOptions = Object.assign({}, options);
  finalOptions.fields = options.projection;
  finalOptions.remove = true;
  // Execute find and Modify
  findAndModify(coll, filter, options.sort, null, finalOptions, callback);
}
function findOneAndDelete(coll, filter, options, callback) {
  // Final options
  const finalOptions = Object.assign({}, options);
  finalOptions.fields = options.projection;
  finalOptions.remove = true;
  // Execute find and Modify
  findAndModify(coll, filter, options.sort, null, finalOptions, callback);
}
function findOneAndDelete ( coll , filter , options , callback ) { // Final options const finalOptions = Object . assign ( { } , options ) ; finalOptions . fields = options . projection ; finalOptions . remove = true ; // Execute find and Modify findAndModify ( coll , filter , options . sort , null , finalOptions , callback ) ; }
Find a document and delete it in one atomic operation. This requires a write lock for the duration of the operation.

@method
@param {Collection} a Collection instance.
@param {object} filter Document selection filter.
@param {object} [options] Optional settings. See Collection.prototype.findOneAndDelete for a list of options.
@param {Collection~findAndModifyCallback} [callback] The collection result callback
Find a document and delete it in one atomic operation . This requires a write lock for the duration of the operation .