title: How can I share code between two models in mongoose?
body: <p>I have three or four methods that are the same across three mongoose models. Is there way to define these methods in one file and include them?</p>
  
  <pre><code>aSchema.methods.onTimeout = function() {
    // same do stuff like in bSchema
  }
  
  bSchema.methods.onTimeout = function() {
    // same do stuff like in aSchema
  }
  </code></pre>