title: protractor calling an exported function within the same module
body: <p>I'm newer to using Protractor for automation, so forgive me if this ends up being a dumb question. I have a <code>helper.js</code> module with a bunch of functions that I or other team members can use. One of the functions from <code>helper.js</code> needs to call to one of the existing functions in the module. </p>
  
  <p>Is this possible? I have tried several different ways to do this and so far none have worked other than to break the helper functions into a separate js file that I need to call to.</p>
  
  <p>Example:
  helper.js:</p>
  
  <pre><code>module.exports = {
      newbrowsertab: function(){
          &lt;code&gt;
      },
      anotherfunction: function(){
          &lt;code&gt;
          &lt;call to newbrowsertab();&gt;
          &lt;code&gt;
       },
       anotherfunction2: function(){
           &lt;code&gt;
       }
  };
  </code></pre>
  
  <p>In the call to the newbrowsertab function, I've tried:</p>
  
  <ul>
  <li><code>module.newbrowsertab();</code><br/></li>
  <li><code>this.newbrowsertab();</code><br/></li>
  <li><code>self.newbrowsertab();</code></li>
  </ul>