title: Nested namespaces vs. ES modules
body: <p>With traditional JavaScript namespacing techniques I am able to create a nested logical grouping, even over multiple files. How should I replace that with ES modules alias import.</p>
  <p>Consider the case where I want all my code in a CompanyName namespace, then group by products and within a product I may have a group of shared functions and these could be grouped by topic (very common in many languages like Java, C# etc.). F.e.</p>
  <pre><code>CompanyName = {
      ProductName1: {
          Shared: {
              Database: {
                  enumerateDatabases: function() {
                      ....
                  }
                  ...
              }
          }
      },
      ProductName2: {
          ....
      }
  }
  </code></pre>
  <p>If I understand correctly ES modules allow me to use exactly one alias to create a namespace, f.e.</p>
  <pre><code>import * as CompanyName from ...
  </code></pre>
  <p>An alias like CompanyName only is certainly not specific enough. An alias like</p>
  <pre><code>import * as CompanyNameProductName1SharedDatabase from...
  </code></pre>
  <p>is almost unreadable and a simple alias like</p>
  <pre><code>import * as Database from...
  </code></pre>
  <p>may quickly become ambiguous and I would have to go with aliases like</p>
  <pre><code>import * as MyDatabase from...
  import * as YourDatabase from...
  </code></pre>
  <p>Does that mean there is no way of grouping code as shown above? Or should I go with a mixture of both techniques?</p>