title: monkeypatch exported function
body: <p>running on <code>nodev4</code> - </p>
  
  <p>let's say that I have 2 libraries : <code>foo</code> and <code>bar</code></p>
  
  <p><code>foo</code> has this</p>
  
  <pre><code>var bar = require('./lib/bar');
  exports = module.exports = function myApp(options) {
   [snip]
  }
  exports bar = bar;
  </code></pre>
  
  <p>and <code>bar</code> has this</p>
  
  <pre><code>module.exports = function doStuff(moreOptions) {
    function doMoreStuff () {
    }
  }
  </code></pre>
  
  <p>my app has </p>
  
  <pre><code>x = requires(foo); 
  </code></pre>
  
  <p>what I would like to do is get my app to monkeypatch the <code>doMoreStuff</code> function - is this possible ?</p>
  
  <p>I have tried various libraries , but I suspect there's a fundamental problem with my understanding of js ;)</p>