Javascript Analysis tool for code dependencies
<p>I was wondering if there exist javascript analysis tools that analyse a bunch of javascript files and determines which javascript files depend on each other. For example:</p>

<p>file A:</p>

<pre><code>function testObject() {
}
</code></pre>

<p>file B:</p>

<pre><code>var test = testObject();
</code></pre>

<p>Then I should get that file B depends on A since B uses function testObject defined in file A. Something similar exists for node, which is <a href="https://www.npmjs.com/package/madge" rel="nofollow">madge</a>, but I was wondering if this also exists for the described case. Madge seems to only work for javascript files that specifically use <code>require</code> to import the functionality.</p>