title: How to find JavaScript functions in a JavaScript (.js) file command line?
body: <p>I'm looking for a way to get all the top level functions, properties and methods defined in a <code>.js</code> file without a browser, preferably in command line. I have looked into <a href="http://esprima.org/" rel="nofollow">esprima</a> parser and <a href="https://github.com/Constellation/escope" rel="nofollow">escope</a> but it seems to be an overkill really. </p>
  
  <p>I've seen other questions here asking similar questions, but I'm looking for a solution not using a browser(without the <code>window</code> object), using something like <code>rhino</code> javascript engine.</p>
  
  <p>Is there a simple way to achieve this without using a javascript parser?</p>