Q: Front end dependency manager for appending 
A: As @morganney pointed out, Require.js is designed pretty much exactly for this purpose. Many popular libraries export their libraries in UMD format, which supports the AMD (Async Module Definition) logic Require.js expects.

A: This will simply import asynchronously all the first level libraries in your object, using just JavaScript import.
From the network debugger tab, we can observe the HTTP code 200 success:



const ScriptLoader = async (libs) => {
  for (const [k] of Object.entries(libs)) {
    console.log(k, libs[k].attr.src);
    await import(libs[k].attr.src)
    // Lib ready here
  }
}

const scriptLoader = ScriptLoader({
    "jquery@3.4.1": {
        "attr": {
        "src": "https://code.jquery.com/jquery-3.4.1.min.js",
        "integrity": "sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=",
        "crossOrigin": "anonymous",
        },
    },
    "bootstrap@4.0.0": {
        "attr": {
        "src": "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js",
        "integrity": "sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl",
        "crossOrigin": "anonymous",
        },
        "dependencies": ["jquery@3.4.1", "popper@1.12.9"],
    },
});


