title: How to go about utilizing acorn.js in another .js file?
body: <p>I'm trying to write a Javascript translator using a Javascript parser called "acorn.js." I'm writing my code in Sublime using a Node build system. Calling the following line:</p>
  
  <pre><code>require("./acorn.js");
  </code></pre>
  
  <p>produces no errors, but whenever I attempt to access any functions within that file, an undefined error is thrown. Is there any way I can import or reference this library to gain access to its functions without having to utilize a JQuery import or something of the like?</p>
  
  <p><strong>Here is the answer:</strong></p>
  
  <pre><code>var test = acorn.parse("var x;");
  </code></pre>
  
  <p>And if you're using this specific library, what is returned is an AST of the contents of what you parse. In this case, it's the string "var x;".</p>