title: Node.JS export function without object wrapper
body: <p>I am looking at <a href="https://github.com/mikeal/request" rel="noreferrer">Node.JS request</a> and notice that you can use</p>
  
  <pre><code>var request = require('request');
  request(...)
  </code></pre>
  
  <p>But when I try to do something similar like in the module I try </p>
  
  <pre><code>exports = function() {}
  </code></pre>
  
  <p>it does not work. The only way I know to use is </p>
  
  <pre><code>var request = require('request').request;
  request(...)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>exports.request = function() {}
  </code></pre>
  
  <p>How can I set the whole export to a function instead of adding a function to the export object?</p>
  
  <p>A hint might be available in the <a href="https://github.com/mikeal/request/blob/8bb7f98ba8b78c217552c979811c07f1299318fe/main.js#L320-361" rel="noreferrer">request source code</a> but I am finding it hard to figure out what is going on. Can you help?</p>