title: Separate functions in node.js file
body: <p>I want to separate functions in my node.js file. I don't know how to do it.</p>
  
  <p>Here is an example:</p>
  
  <pre><code>    var var1 = 'I want to use this var along across all included files';
      var var2 = 'I want to use this var along across all included files';
      var actions = {
          send1() { //function 1 with var1 &amp; var2 },
          send1a() { //function 1a with var1 &amp; var2},
          send2() { //function 2 with var1 &amp; var2},
          send2a() { //function 2a with var1 &amp; var2}
      };
  </code></pre>
  
  <p>I want to export <code>send1()</code> &amp; <code>send1a()</code> in <code>function1.js</code> and <code>send2()</code> &amp; <code>send2a()</code> in <code>function2.js</code> in order to have clean files and use  <code>var1</code> &amp; <code>var2</code>.</p>
  
  <p>How can I do that correctly?</p>