title: How to tell if bootstrap.js or bootstrap.bundle.js is loaded?
body: <p>My code depends on both Bootstrap 4 and Popper.js. Bootstrap has a bundled JS file that includes Popper.js, but I can't figure out how to tell if the bundled or non-bundled version is loaded.</p>
  
  <p>If bootstrap.js and popper.js are both included separately, I can test if <code>Popper</code> is defined, but if bootstrap.bundle.js is included <code>Popper</code> is not defined but the Bootstrap components that rely on Popper still work.</p>
  
  <p>I can use something like <code>typeof $().modal</code> to check if bootstrap is included, but this is true of both the bundled and non-bundled verison.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Bootstrap Bundle Test&lt;/title&gt;
          &lt;!-- Load jQuery JS --&gt;
          &lt;script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="crossorigin="anonymous"&gt;&lt;/script&gt;
  
          &lt;!-- Load Bootstrap Bundled JS --&gt;
          &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js" integrity="sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o" crossorigin="anonymous"&gt;&lt;/script&gt;
  
          &lt;script&gt;
              $(document).ready(function() {
                  console.log('jQuery type is: ' + typeof $);
                  console.log('Bootstrap modal type is: ' + typeof $().modal);
                  console.log('Popper type is: ' + typeof Popper);
              });
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>In this example, I would expect <code>Popper</code> to be a function since it's included in the Bootstrap bundle, but it is <code>undefined</code>.</p>