title: how to export 2 different functions from one js file into another Js file in Protractor
body: <p>Kindly help me to find the solution just wanted know how to export 2 functions into spec or in another js file. pls check my below code for ur reference. This is some agentdetails.js file. I want to call the below functions in spec(both the functions) some times i use only one</p>
  
  <pre><code>var AddAgent = function()                                                                                          
  {                                                                                                                                                                                                                                  
  var AGP = require('D:/Automation/ServCloud/PageObjects/AgentDetailsObjects.js');                                   
  var Login = require('D:/Automation/ServCloud/Test DATA/TestData.json');                                            
                                                                                                                AGP.Agent.click();                                                                                                 
  AGP.AddAgentbtn.click();                                                                                           
  AGP.Supervisor.click();                                                                                            
  AGP.AgtSave.click();                                                                                               
  }                                                                                                                   
  module.exports = new AddAgent();     
  
  var EditAgent = function()                                                                                         
  {                                                                                                                  
  
      var AGP = require('D:/Automation/ServCloud/PageObjects/AgentDetailsObjects.js');                               
      var Login = require('D:/Automation/ServCloud/Test DATA/TestData.json');                                        
  
      AGP.AgentEdit.click();                                                                                         
      AGP.AgtSave.click();                                                                                           
      browser.sleep(3000);                                                                                           
      var alertDialog = browser.switchTo().alert();                                                                                                                                                                         }                                                                                                                  
  module.exports = new EditAgent();       
  </code></pre>
  
  <p>I have tried like this. (FYI - I can make this into one function and i can call it but i wanted to split into 2 functions and call both in one spec separately so that i can comment which ever is not required at times </p>
  
  <pre><code>    it('Add Agent Details', function() 
      { 
      var aa = require('D:/Automation/ServCloud/Actions/AgentAction.js');
  aa.AddAgent();
  
  aa.EditAgent(); 
      });
  </code></pre>