title: Mongoose: how to check if document is modified via model.findOneAndUpdate()
body: <p>In mongoose, we can check if an update operation has modified the document with <code>model.update()</code>:</p>
  
  <pre><code>model.update(query, update, function(err, raw){
      if (raw.nModified &gt;= 1) console.log('document is modified!')
  });
  </code></pre>
  
  <p>Is there a way to do the same with <code>model.findOneAndUpdate()</code>?</p>
  
  <pre><code>model.findOneAndUpdate(query, update, { new: true }, function(err, doc){
      if (doc) {
          // So MongoDB found the document, but is there a way 
          // to know the document was indeed modified?
      }
  });
  </code></pre>