My project uses a Promise polyfill and the fetch polyfill, that I am only including if the browser does not yet support it// Browser doesn't have Promiseif (!window.Promise) {  require(['es6-promise'], function(promise) {    promise.polyfill();    // Browser doesn't have Promise or fetch    if (!window.fetch) {      require(['fetch'], function(fetch) {        run();      });    // Browser doesn't have Promise but does have fetch    } else {      run();    }  });// Browser has Promise but doesn't have fetch} else if (!window.fetch) {  require(['fetch'], function(fetch) {    run();  });// Browser has Promise and fetch} else {  run();}This accounts for every permutation of browser support for Promise and fetch, but it seems like a verbose way of doing things. Is there a better to dynamically load these polyfills?
Including the necessary polyfills for every combination of browser support
javascript;modules;require.js