title: Explanation for nested module.exports
body: <p>I have a piece of code in an old code base that contains nested <code>module.exports</code> like the following. I haven't seen such a form of export before. Can some please explain or atleast point me to the right articles? </p>
  
  <pre><code>module.exports = function something(options) {
  
     someMethod = new func1(options);
  
     module.exports.anotherFunc = function (req, res) {
         someMethod.anotherFunc1(req, res);
     };
  
     module.exports.func1 = someMethod.func3;
  
     return function func4(req, res, next) {
         someMethod.anotherFunc1(req, res);
         next();
     };
  };
  </code></pre>