title: Binding the require function in Node.js
body: <p>I would like to include functions from a module into the current namespace. I was hoping I could utilize the bind function towards this goal, but I haven't got it working so far. Here's what I'm working with:</p>
  
  <p>The module:</p>
  
  <pre><code>//exampleModule.js
  this.fn = function(){return 7;}
  </code></pre>
  
  <p>The file which uses the module:</p>
  
  <pre><code>var example = require('./exampleModule.js')
  console.log(example.fn())
  </code></pre>
  
  <p>What I'd like to do:</p>
  
  <pre><code>require.bind(this)('./exampleModule.js')
  console.log(this.fn())
  </code></pre>
  
  <p>I was hoping that binding the 'this' from the non-module code would cause the module to load fn into that object, but that does not seem to be the case.</p>