title: Node.js: Calling one exported function from another in the same module
body: <p>I am writing a node.js module that exports two functions and I want to call one function from the other but I see an undefined reference error. </p>
  
  <p>Is there a pattern to do this? Do I just make a private function and wrap it?</p>
  
  <p>Here's some example code:</p>
  
  <pre><code>(function() {
      "use strict";
  
      module.exports = function (params) {
          return {
              funcA: function() {
                  console.log('funcA');
              },
              funcB: function() {
                  funcA(); // ReferenceError: funcA is not defined
              }
          }
      }
  }());
  </code></pre>