title: How to self-reference NodeJS Module?
body: <p>I have a module that I'm exporting. I need one function to call another function. Here's a simplified version of what I'm trying to do.  </p>
  
  <pre><code>module.exports = {
    isEven: (number) =&gt; {
      return (number%2 == 0)
    },
    isTenEven: () =&gt; {
      return isEven(10)
    }
  }
  </code></pre>
  
  <p>The code above throws <code>isEven is not defined</code> when <code>moduleName.isTenEven()</code> is called. </p>
  
  <p>It makes sense why it fails. But how would you rewrite it? (While maintaining the singleton pattern)</p>