title: Call a "local" function within module.exports from another function in module.exports?
body: <p>How do you call a function from within another function in a <code>module.exports</code> declaration?</p>
  
  app.js
  
  <pre><code>var bla = require('./bla.js');
  console.log(bla.bar());
  </code></pre>
  
  bla.js
  
  <pre><code>module.exports = {
  
    foo: function (req, res, next) {
      return ('foo');
    },
  
    bar: function(req, res, next) {
      this.foo();
    }
  
  }
  </code></pre>
  
  <p>I'm trying to access the function <code>foo</code> from within the function <code>bar</code>, and I'm getting:</p>
  
  <blockquote>
    <p>TypeError: Object # has no method 'foo'</p>
  </blockquote>
  
  <p>If I change <code>this.foo()</code> to just <code>foo()</code> I get: </p>
  
  <blockquote>
    <p>ReferenceError: foo is not defined</p>
  </blockquote>