title: Purpose of JavaScript Source Map names array?
body: <p>The JS source map <a href="https://sourcemaps.info/spec.html" rel="nofollow noreferrer">spec</a> contains an identifier array to which each mapping location can refere to.</p>
  <pre><code>{
     &quot;version&quot; : 3,
     &quot;file&quot;: &quot;out.js&quot;,
     &quot;sourceRoot&quot;: &quot;&quot;,
     &quot;sources&quot;: [&quot;foo.js&quot;, &quot;bar.js&quot;],
     &quot;sourcesContent&quot;: [null, null],
     &quot;names&quot;: [&quot;src&quot;, &quot;maps&quot;, &quot;are&quot;, &quot;fun&quot;],
     &quot;mappings&quot;: &quot;A,AAAB;;ABCDE;&quot;
  }
  </code></pre>
  <p>The <code>mappings</code> array contains a VLQ encoded mapping of locations (column/row) from the minified source back to the original source file.</p>
  <p>Why do I still need the <code>names</code> array since the <code>mappings</code> array already contain a mapping. Even when an identifier &quot;foo&quot; gets minified to to &quot;f&quot; we still know the position and the length of the identifier through the mappings array. So, the names array seems redundant for me or am I missing something?</p>